diff --git a/AF/AF.aspx b/AF/AF.aspx index f89764e5b..15b22ec92 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -489,6 +489,18 @@ + +
+
+ +
+ +
+
+ +
+
+
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 9e5a61305..2a68ffb0a 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -401,7 +401,7 @@ Public Class ClsAF CveSubProyecto As Integer, Cuenta As Integer, CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer, CveMovimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1, Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha, - Optional Lat As String = "", Optional Longi As String = "") As Integer + Optional Lat As String = "", Optional Longi As String = "", Optional AgroCuenta As String = "") As Integer Dim Retorno As Integer = -1 @@ -437,6 +437,7 @@ Public Class ClsAF .Add("@Lat", SqlDbType.VarChar).Value = Lat .Add("@Long", SqlDbType.VarChar).Value = Longi + .Add("@AgroCuenta", SqlDbType.VarChar).Value = AgroCuenta .Add("@CveActivoFijo", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue @@ -455,7 +456,7 @@ Public Class ClsAF Alert("Capture un SubTipo de Activo Fijo Valido", TipoMensaje.MsgAdvertencia) Else - Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia) End If Else @@ -472,7 +473,7 @@ Public Class ClsAF CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer, CveUsuarioModifico As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1, Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha, - Optional Lat As String = "", Optional Longi As String = "") As Boolean + Optional Lat As String = "", Optional Longi As String = "", Optional AgroCuenta As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_AF_ActivosFijosUpdate") @@ -507,6 +508,7 @@ Public Class ClsAF .Add("@FechaBaja", SqlDbType.Date).Value = FechaBaja .Add("@Lat", SqlDbType.VarChar).Value = Lat .Add("@Long", SqlDbType.VarChar).Value = Longi + .Add("@AgroCuenta", SqlDbType.VarChar).Value = AgroCuenta End With Try diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 78225137a..8bfdbc021 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2624,7 +2624,7 @@ Public Class ClsNominas Dim retorno As Boolean = False Try DTSet = New DataSet() - DataAdapter("PA_Nom_NominaEmpleadosz", CommandType.StoredProcedure) + DataAdapter("PA_Nom_NominaEmpleados", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 2bf50e4a2..186a58525 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -492,7 +492,12 @@ public partial class Nomina_Nomina2 : ClsPaginas CveTipoTrabajador = DdlTipoTrabajador.SelectedValue.ToEntero(); HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo)); cargaDatos(); - LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, dtempleados.COUNT("CvePersonal", " CvePersonal >0 ")); + int empleados = 0; + if(dtempleados != null && dtempleados.Rows.Count>0) + { + empleados = dtempleados.COUNT("CvePersonal", " CvePersonal >0 "); + } + LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, empleados); LtlPeriodoseleccionadoASis.Text = LtlPeriodoseleccionado.Text; }