Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -374,8 +374,7 @@ Partial Class AF_AF
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
InicializaValores()
|
||||
|
||||
InicializaValores()
|
||||
|
||||
CargaCombos()
|
||||
|
||||
@@ -407,6 +406,7 @@ Partial Class AF_AF
|
||||
|
||||
BtnEliminar.Visible = False
|
||||
CargaAFPadres()
|
||||
CargaCuentasContables()
|
||||
|
||||
End If
|
||||
|
||||
@@ -2498,6 +2498,11 @@ Partial Class AF_AF
|
||||
FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) > 0 Then
|
||||
ViewState("CveActivoFijo") = ObjAF.CveActivoFijo
|
||||
GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
If Not ObjContabilidad.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuenta:=DdlCtaContable.SelectedValue.ToEntero, CveActivoFijo:=ObjAF.CveActivoFijo) Then
|
||||
ErrorGuardar = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorGuardar = True
|
||||
End If
|
||||
@@ -3111,25 +3116,36 @@ Partial Class AF_AF
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
trCuentaContable.Visible = True
|
||||
Dim DtCuentas As New DataTable
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
DtCuentas = Conta.DtResultados
|
||||
End If
|
||||
Conta.Dispose()
|
||||
DdlCtaContable.DataValueField = "CveCuenta"
|
||||
Else
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim CuentaPadre = UsuarioActual.Empresa.Funcionalidad(221).ToEntero
|
||||
|
||||
If Conta.GetCuentasRecursiva(CuentaPadre, 1) Then
|
||||
DtCuentas = Conta.DtResultados
|
||||
Else
|
||||
DtCuentas = Nothing
|
||||
Alert("Ocurrió un error al obtener las Cuentas Contables.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
DdlCtaContableDepreciacion.DataSource = DtCuentas
|
||||
DdlCtaContableDepreciacion.DataBind()
|
||||
End If
|
||||
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim DtCuentas As New DataTable
|
||||
Dim CuentaPadre = UsuarioActual.Empresa.Funcionalidad(221).ToEntero
|
||||
|
||||
If Conta.GetCuentasRecursiva(CuentaPadre, 1) Then
|
||||
DtCuentas = Conta.DtResultados
|
||||
Else
|
||||
DtCuentas = Nothing
|
||||
Alert("Ocurrió un error al obtener las Cuentas Contables.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
DdlCtaContable.DataSource = DtCuentas
|
||||
DdlCtaContable.DataBind()
|
||||
|
||||
DdlCtaContableDepreciacion.DataSource = DtCuentas
|
||||
DdlCtaContableDepreciacion.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -5996,7 +5996,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
|
||||
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1,
|
||||
@@ -6010,7 +6010,6 @@ Public Class ClsContabilidad
|
||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
@@ -6038,7 +6037,7 @@ Public Class ClsContabilidad
|
||||
End Function
|
||||
|
||||
Public Function UpdateCuentasAsignaciones(CveConceptoAsignacion As Integer, Optional CveConceptoContable As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||
Optional IdCtaContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||
Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1,
|
||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1,
|
||||
@@ -6051,7 +6050,6 @@ Public Class ClsContabilidad
|
||||
.Add("@CveCuentaAsignacion", SqlDbType.Int).Value = CveConceptoAsignacion
|
||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
|
||||
@@ -1008,6 +1008,29 @@ Public Class ClsNominas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetNom_NominasDataXML(CveNomina As Integer, CvePersonal As Integer, CvePeriodo As Integer, CveNominaTipo As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_NominasDataXMLGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("CveNomina", SqlDbType.Int).Value = CveNomina
|
||||
.Add("CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("CveNominaTipo", SqlDbType.Int).Value = CveNominaTipo
|
||||
.Add("CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener La Nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AutorizaNom_Nominas(CvePersonal As Integer, CvePeriodo As Integer, Optional Autorizado As Boolean = True) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_Nominas_Autoriza")
|
||||
|
||||
@@ -4652,7 +4652,7 @@ Public Class ClsPaginas
|
||||
bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "")
|
||||
End If
|
||||
RutaReporte.Replace("/", "\")
|
||||
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
|
||||
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
|
||||
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
|
||||
End If
|
||||
If EsProduccion Then
|
||||
@@ -6720,6 +6720,10 @@ Public Class ClsPaginas
|
||||
DTPercepciones = Nothing
|
||||
DTDeducciones = Nothing
|
||||
End If
|
||||
Dim SalarioDiario As String
|
||||
Dim SDI As String
|
||||
Dim Departamento As String
|
||||
Dim Puesto As String
|
||||
'DATOS DEL EMPLEADO
|
||||
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
||||
RptParametro.Add(New ReportParameter("NoEmpleado", ObjPersonal.Codigo))
|
||||
@@ -6729,39 +6733,49 @@ Public Class ClsPaginas
|
||||
RptParametro.Add(New ReportParameter("Regimen", ObjPersonal.RegimenContratacion))
|
||||
RptParametro.Add(New ReportParameter("RiesgoPuesto", ObjPersonal.RiesgoPuesto))
|
||||
RptParametro.Add(New ReportParameter("NSS", ObjPersonal.NumeroSS))
|
||||
RptParametro.Add(New ReportParameter("Departamento", ObjPersonal.Departamento))
|
||||
RptParametro.Add(New ReportParameter("Puesto", ObjPersonal.Puesto.ToString()))
|
||||
Departamento = ObjPersonal.Departamento
|
||||
Puesto = ObjPersonal.Puesto.ToString()
|
||||
RptParametro.Add(New ReportParameter("FechaIngreso", ObjPersonal.FechaIngreso.ToString("dd/MM/yyyy")))
|
||||
RptParametro.Add(New ReportParameter("Contrato", ObjPersonal.TipoContrato.ToString))
|
||||
RptParametro.Add(New ReportParameter("Jornada", ObjPersonal.Jornada))
|
||||
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
||||
RptParametro.Add(New ReportParameter("SalarioBase", ObjPersonal.SalarioDiario.ToString))
|
||||
RptParametro.Add(New ReportParameter("SalarioDiarioInt", ObjPersonal.SDI.ToString))
|
||||
RptParametro.Add(New ReportParameter("Banco", ObjPersonal.Banco))
|
||||
RptParametro.Add(New ReportParameter("CLABE", ObjPersonal.CLABE))
|
||||
|
||||
SalarioDiario = ObjPersonal.SalarioDiario.ToString
|
||||
SDI = ObjPersonal.SDI.ToString
|
||||
If ObjNomina.GetNom_NominasDataXML(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) AndAlso ObjNomina.DtResultados.Rows.Count > 0 Then
|
||||
Dim drow As DataRow = ObjNomina.DtResultados.Rows(0)
|
||||
SalarioDiario = drow("SalarioDiario").ToString()
|
||||
SDI = drow("NomRSalarioDiarioIntegrado").ToString()
|
||||
Departamento = drow("NomRDepartamento").ToString()
|
||||
Puesto = drow("NomRPuesto").ToString()
|
||||
End If
|
||||
RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario))
|
||||
RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI))
|
||||
RptParametro.Add(New ReportParameter("Departamento", Departamento))
|
||||
RptParametro.Add(New ReportParameter("Puesto", Puesto))
|
||||
'DATOS NOMINA
|
||||
If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
|
||||
RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
|
||||
RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
|
||||
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
|
||||
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
||||
RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
|
||||
RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)"
|
||||
RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)"))
|
||||
RptParametro.Add(New ReportParameter("Cantidad", "1"))
|
||||
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
|
||||
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
|
||||
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
|
||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
|
||||
RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras))
|
||||
RptParametro.Add(New ReportParameter("Clave", "84111505"))
|
||||
RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
|
||||
RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
|
||||
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
|
||||
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
||||
RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
|
||||
RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)"
|
||||
RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)"))
|
||||
RptParametro.Add(New ReportParameter("Cantidad", "1"))
|
||||
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
|
||||
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
|
||||
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
|
||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
|
||||
RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras))
|
||||
RptParametro.Add(New ReportParameter("Clave", "84111505"))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
If Not TieneError Then
|
||||
If ObjNomina.GetPeriodos(-1, CveEmpresa, -1, -1, CvePeriodo) Then
|
||||
|
||||
@@ -1102,10 +1102,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Msg.AppendFormat(" Folio: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/> <br/> ", CveIE, TxtFolio.Text)
|
||||
|
||||
Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir movimiento</a><br/> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)))
|
||||
'End If
|
||||
|
||||
Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Listado</a><br/> ", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIE)))
|
||||
If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a><br/> ", IDPoliza)
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
|
||||
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a> ", CvePrePoliza)
|
||||
End If
|
||||
|
||||
Dim Mensaje As String = String.Format("El Documento se generó correctamente.<br /><br /> {0} ", Msg.ToString)
|
||||
|
||||
'LIMPIA
|
||||
|
||||
@@ -27,9 +27,8 @@ Partial Class Contabilidad_CatCuentas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
'inicio()
|
||||
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
Server.Transfer("/Contabilidad2/CatCuentas.aspx")
|
||||
End If
|
||||
|
||||
|
||||
@@ -97,9 +97,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
'inicio()
|
||||
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
|
||||
' If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -346,7 +344,6 @@ Partial Class Contabilidad2_CatCuentas
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim CveConceptoAdmin As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
|
||||
@@ -344,7 +344,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim ErrorString As String = ""
|
||||
If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||
@@ -352,7 +352,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||
|
||||
@@ -1179,7 +1179,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjProv.IniciaTransacSQL)
|
||||
|
||||
If Not ObjConta.AddCuentasAsignaciones(CveConceptoCuentaAsiganaciones, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
If Not ObjConta.AddCuentasAsignaciones(CveConceptoCuentaAsiganaciones, UsuarioActual.CveEmpresa, CveCuentaContable,
|
||||
ObjProv.CveProveedor, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorProv = True
|
||||
@@ -1419,7 +1419,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjClientes.IniciaTransacSQL)
|
||||
|
||||
If Not ObjConta.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
If Not ObjConta.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CveCuentaContable,
|
||||
-1, ObjClientes.CveCliente, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorClientes = True
|
||||
@@ -1917,21 +1917,21 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If CveAF > 0 Then
|
||||
If CveCuentaContable > 0 Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable,
|
||||
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
If CveCuentaContableDepreciacion > 0 Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion, -1,
|
||||
If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion,
|
||||
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
If CveCuentaContableDepreciacion > 0 Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(270, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacionAcum, -1,
|
||||
If Not ObjConta.AddCuentasAsignaciones(270, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacionAcum,
|
||||
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorAF = True
|
||||
@@ -2976,7 +2976,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
|
||||
|
||||
If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, CveEmpresa, CveCuentaContable, -1,
|
||||
If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, CveEmpresa, CveCuentaContable,
|
||||
CveProveedor, CveCliente, CvePersonal, CveClasificacion, -1, 0, CveBancoCuenta:=CveBancoCuenta, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False, OpActualizarClasificacion:=OpActualizarClasificacion) Then
|
||||
Respuesta = True
|
||||
@@ -3628,7 +3628,7 @@ Partial Class General_SaldosIniciales
|
||||
If CveCuentaContable > 0 Then
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjRH.IniciaTransacSQL)
|
||||
If Not ObjConta.AddCuentasAsignaciones(28, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
If Not ObjConta.AddCuentasAsignaciones(28, UsuarioActual.CveEmpresa, CveCuentaContable,
|
||||
-1, -1, ObjRH.CvePersonal, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorRH = True
|
||||
|
||||
@@ -3103,7 +3103,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ValorMultiplicador = -1
|
||||
End If
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/EntregaAlmacen", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/EntregaAlmacen", 1, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
@@ -2776,8 +2776,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//NomAutorizado = gvrow.DataKey("NomAutorizado").ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
SRCvePersonal = TxtCvePersonal.Text.ToEntero();
|
||||
showhideaccionesSR();
|
||||
HypXmlSobreRecibo.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
HyppdfSobreRecibo.Attributes.Add("onclick", string.Format("GETXML({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
HypXmlSobreRecibo.Attributes.Add("onclick", string.Format("GETXML({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
HyppdfSobreRecibo.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
string Nombre = "";
|
||||
@@ -8684,7 +8684,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
if (CveconceptosContables > 0 && CveCuenta > 0)
|
||||
{
|
||||
if (!ObjConta.AddCuentasAsignaciones(CveconceptosContables, UsuarioActual.CveEmpresa, CveCuenta, IdCuentaContable, CveProveedor, CveClientes,
|
||||
if (!ObjConta.AddCuentasAsignaciones(CveconceptosContables, UsuarioActual.CveEmpresa, CveCuenta, CveProveedor, CveClientes,
|
||||
CvePersonal, CveClasificacion, CveAlmacen, -1, CveBancoCuenta: -1, CveConceptoNomina: CveConceptoNomina))
|
||||
{ continuar = false; }
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<div>
|
||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Clasificación">
|
||||
<ItemTemplate>
|
||||
@@ -173,13 +173,10 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="5%" HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-Width="5%" HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaClasificacion" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="5%" HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="80" />
|
||||
@@ -230,6 +227,7 @@
|
||||
|
||||
|
||||
<div class="form-group input-iconright" id="DivCuentaGasto" runat="server">
|
||||
<asp:HiddenField ID="HdnCveCuentaAsignacion" runat="server" />
|
||||
<label for="<%= DdlCuentaGasto.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Gasto:</label>
|
||||
<asp:DropDownList ID="DdlCuentaGasto" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -145,8 +145,8 @@ Partial Class CatClasificaciones
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificaciones() Then
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
@@ -154,24 +154,10 @@ Partial Class CatClasificaciones
|
||||
CargaGrid()
|
||||
End Sub
|
||||
|
||||
'Public Sub CargaGlobal()
|
||||
|
||||
' Dim ObjClasificaciones As New ClsClasificaciones
|
||||
|
||||
' If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||
' ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
' GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
' Else
|
||||
' Me.GvDatos.DataSource = Nothing
|
||||
' Alert("Ocurrió un error al cargar las clasificaciones. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' ObjClasificaciones.Dispose()
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
Dim objConta As New ClsContabilidad(ObjClasificaciones.IniciaTransacSQL)
|
||||
Dim RequireSerieLote As Integer = If(ChkRequiereSerieLote.Checked, 1, 0)
|
||||
|
||||
If HdnModalidadClasificacion.Value = "A" Then
|
||||
@@ -183,7 +169,11 @@ Partial Class CatClasificaciones
|
||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(6, UsuarioActual.CveEmpresa, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
If DdlCuentaCostos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(69, UsuarioActual.CveEmpresa, DdlCuentaCostos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
If DdlCuentaIngresos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(4, UsuarioActual.CveEmpresa, DdlCuentaIngresos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
End If
|
||||
TxtClasificacion.Text = ""
|
||||
TxtPrecioBaseCosto.Text = ""
|
||||
DdlCuentaGasto.SelectedValueExist("0")
|
||||
@@ -206,11 +196,18 @@ Partial Class CatClasificaciones
|
||||
Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then objConta.UpdateCuentasAsignaciones(HdnCveCuentaAsignacion.Value.ToEntero, 6, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=CveClasificacion)
|
||||
|
||||
End If
|
||||
|
||||
ObjClasificaciones.Commit()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al actualizar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
ObjClasificaciones.RollBack()
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -236,7 +233,7 @@ Partial Class CatClasificaciones
|
||||
DtCuentasContables.Columns("CtaCodigo").ColumnName = "Cuenta"
|
||||
End If
|
||||
ObjContabilidad.Dispose()
|
||||
ElseIf UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
ElseIf UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas
|
||||
Dim Empresa As Empresa = Nothing
|
||||
@@ -249,11 +246,8 @@ Partial Class CatClasificaciones
|
||||
ObjContabilidad.Dispose()
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCargarCuentas_Click(sender As Object, e As EventArgs) Handles BtnCargarCuentas.Click
|
||||
@@ -421,6 +415,7 @@ Partial Class CatClasificaciones
|
||||
ChkRequiereAFCompra.Checked = If(GvRow.DataKey("RequiereAFCompra") = "True", True, False)
|
||||
ChkRequiereAFInsumo.Checked = If(GvRow.DataKey("RequiereAFInsumo") = "True", True, False)
|
||||
ChkRequierePersonal.Checked = If(GvRow.DataKey("RequierePersonal") = "True", True, False)
|
||||
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacionGasto")
|
||||
|
||||
If CuentaGasto.Length > 1 And CargaGastos Then
|
||||
DdlCuentaGasto.Items.Insert(0, New ListItem(CuentaGasto, CveCuentaGastoActual.ToString))
|
||||
|
||||
Reference in New Issue
Block a user