diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb
index b4ce6e00d..8990aaf81 100644
--- a/App_Code/ClsBancos.vb
+++ b/App_Code/ClsBancos.vb
@@ -611,12 +611,13 @@ Public Class ClsBancos
#Region " B A N C O S - C U E N T A S - U S U A R I O S"
- Public Function GetBancosCuentasUsuarios(CveCuenta As Integer) As Boolean
+ Public Function GetBancosCuentasUsuarios(CveCuenta As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_BancosCuentasUsuariosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 430d4d34d..7a737f3b9 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -1459,14 +1459,8 @@ Public Class ClsPaginas
'sino existe, recarga los datos
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
Dim ObjBancos As New ClsBancos
- If ObjBancos.GetBancosCuentasUsuarios(-1) Then
-
- If CveEmpresa > 0 Then
- Application(AppNombre) = ObjBancos.DtResultados.FiltraParametros($"CveEmpresa = { CveEmpresa }")
- Else
- Application(AppNombre) = ObjBancos.DtResultados
- End If
-
+ If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
+ Application(AppNombre) = ObjBancos.DtResultados
Else
Application(AppNombre) = Nothing
End If
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index d309db755..eeee4c853 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -1973,7 +1973,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try
Return Retorno
End Function
- Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean
+ Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateSalarios")
With SqlAdapter.SelectCommand.Parameters
@@ -1983,7 +1983,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@SalarioDiarioPago", SqlDbType.Money).Value = SalarioDiarioPago
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
.Add("@SDI", SqlDbType.Money).Value = SDI
- .Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
+ .Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
+ .Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 32b6b6183..ad137e7d5 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -7199,7 +7199,7 @@ Namespace Modelos
'sino existe, recarga los datos
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
Dim ObjBancos As New ClsBancos
- If ObjBancos.GetBancosCuentasUsuarios(-1) Then
+ If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
Else
HttpContext.Current.Application(AppNombre) = Nothing
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index dd6cb5620..e53a90a5f 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -61,7 +61,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim correo As String = ""
Dim sitio As String = ""
Dim cuerpo As String = ""
- Dim obj = context.Request("Nombre")
+ Dim obj = context.Request("Nombre") 'Nombre=' + $('#Nombre').val() +'Correo=' + $('#Correo').val() +'Sitio=' + $('#Sitio').val() +'Cuerpo=' + $('#Cuerpo').val() +
If Not IsNothing(obj) Then
nombre = obj.ToString()
End If
@@ -75,11 +75,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If
obj = context.Request("Cuerpo")
If Not IsNothing(obj) Then
- cuerpo = obj.ToString()
+ cuerpo = obj.ToString().Replace("< ", "<")
End If
- Dim Body As String = String.Format("Nombre : {0} Nombre : {0} Correo : {1} Sitio : {2}
{3}", nombre, correo, sitio, cuerpo)
- Dim para As String = "rene.molina@adssistemas.mx,sig.buzon@gmail.com,julian@adssistemas.mx;paola@adssistemas.mx;"
- para = "caudillo.90d@gmail.com"
+ Dim Body As String = String.Format("Prospecto : {0} Correo : {1} Sitio : {2}
{3}", nombre, correo, sitio, cuerpo)
+ Dim para As String = "rene.molina@adssistemas.mx,sig.buzon@gmail.com,julian@adssistemas.mx;paola@adssistemas.mx;caudillo.90d@gmail.com;"
+ 'para = ""
Dim Mail As New ClsSisMail()
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, para, "NotificaciónProspecto", Body) Then
retorno = "true"
diff --git a/CRM/RepAcercamientosProcesos.aspx b/CRM/RepAcercamientosProcesos.aspx
index c88c06c77..e38a869ea 100644
--- a/CRM/RepAcercamientosProcesos.aspx
+++ b/CRM/RepAcercamientosProcesos.aspx
@@ -5,8 +5,7 @@
-
+
Reporte Detalle de los Acercamientos Procesos
-
+
-
+
-
-
+
-
+
-
-
-
+
+
+
-
-
+
+ <%--
@@ -141,23 +158,112 @@
+
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Consultar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
- HyperLink
+
<%----%>
-
+
-
+
@@ -195,6 +301,6 @@
-
+
diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx.cs b/CRM/RepAcercamientosProcesosDetalle.aspx.cs
index 5864191c0..fe8ab3eb8 100644
--- a/CRM/RepAcercamientosProcesosDetalle.aspx.cs
+++ b/CRM/RepAcercamientosProcesosDetalle.aspx.cs
@@ -80,7 +80,6 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
{
if (!IsPostBack)
{
- CargaDdl();
RCveTipoProceso = Request["CveTipoProceso"] == null ? -1 : Request["CveTipoProceso"].ToString().ToEntero();
RcveVendedor = Request["cveVendedor"] == null ? -1 : Request["cveVendedor"].ToString().ToEntero();
RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero();
@@ -109,6 +108,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
break;
}
DdlTipoProceso.SelectedValueExist(RCveTipoProceso);
+ CargaDdl();
//DdlGrupo1.SelectedValueExist(idgrupo1);
@@ -202,22 +202,22 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
protected void LnkConsultar_Click(object sender, EventArgs e)
{
- RCveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
- switch (RCveTipoProceso)
- {
- case 1:
- RcveVendedor = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
- break;
- case 2:
- RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
- break;
- case 3:
- RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
- break;
- case 4:
- RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
- break;
- }
+ //RCveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
+ //switch (RCveTipoProceso)
+ //{
+ // case 1:
+ // RcveVendedor = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
+ // break;
+ // case 2:
+ // RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
+ // break;
+ // case 3:
+ // RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
+ // break;
+ // case 4:
+ // RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
+ // break;
+ //}
RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RcveVendedor = DdlVendedor.SelectedValue.ToEntero();
diff --git a/CRM/RepAcercamientosRechazos.aspx.cs b/CRM/RepAcercamientosRechazos.aspx.cs
index 2556b6ca7..9a1efc92f 100644
--- a/CRM/RepAcercamientosRechazos.aspx.cs
+++ b/CRM/RepAcercamientosRechazos.aspx.cs
@@ -128,6 +128,12 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
BoundField test = new BoundField();
test.DataField = "Grupo1";
test.HeaderText = "";
+ HyperLinkField hypt = new HyperLinkField();
+ hypt.DataTextField = $"Total";
+ hypt.HeaderText = $"Total";
+ hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" };
+ string strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
+ hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
switch (idgrupo1)
{
case 1:
@@ -145,15 +151,11 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
case 4:
test.HeaderText = "Fecha";
Agrupador = "Fecha";
+ hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={{2}}&FechaFin={{2}}{strfilstros}";
break;
}
GVRepAcercamientosEtapas.Columns.Add(test);
- HyperLinkField hypt = new HyperLinkField();
- hypt.DataTextField = $"Total";
- hypt.HeaderText = $"Total";
- hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" };
- hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}";
GVRepAcercamientosEtapas.Columns.Add(hypt);
foreach (DataRow row in dte.Rows)
{
diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index 976d4a772..7947cd90a 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -695,7 +695,7 @@
-
+
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index 832652772..7cd476459 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -461,8 +461,8 @@ Partial Class Inventarios_EntradasSalidas
End If
DdlClasificacion.DataBind()
- DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
- DdlSeccionAlmacen.DataBind()
+ 'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
+ 'DdlSeccionAlmacen.DataBind()
DdlSeccionAlmacenEntrada.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
DdlSeccionAlmacenEntrada.DataBind()
@@ -2397,7 +2397,11 @@ Partial Class Inventarios_EntradasSalidas
TxtnLote.Text = GvRow.DataKey("Lote")
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad").ToDate.ToShortDateString
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
+
+ DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, GvRow.DataKey("CvePS").ToEntero)
+ DdlSeccionAlmacen.DataBind()
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
+
LkAgregarDetalle.Text = "Actualizar"
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = Origen = 1
@@ -2426,6 +2430,7 @@ Partial Class Inventarios_EntradasSalidas
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad")
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
+
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
divPrecio.Visible = Origen = 1
txtPrecio.Visible = Origen = 1
@@ -4363,6 +4368,7 @@ Partial Class Inventarios_EntradasSalidas
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Alert("Error al Actualizar los movimientos")
Else
+ Alert("Movimiento actualizado correctamente")
RegistraScript("$('#ModalAgregar').modal('hide')")
End If
ObjInventario.Dispose()
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index e5f92f851..7f0ff714e 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -1720,10 +1720,10 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(Dr("AplicaSerie")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
- StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
+ StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
Next
Else
- StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
+ StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
End If
End If
Next
@@ -1959,9 +1959,16 @@ Partial Class Inventarios_EntregaAlmacen
Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado
Dr1("FolioEntrada") = FolioEntrada
- If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
- For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
+ Dim CveSeccionAlmacen As Integer = -1
+ For Each Dr As DataRow In ObjInventario.DtResultados.Rows
+ If CBool(Dr("AplicaSeccion")) Then
+ CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExA, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
+ Else
+ CveSeccionAlmacen = -1
+ End If
+
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For
diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb
index 6cafe91de..448dcc4e4 100644
--- a/Inventarios/Kardex.aspx.vb
+++ b/Inventarios/Kardex.aspx.vb
@@ -63,6 +63,7 @@ Partial Class Inventarios_Kardex
#Region " INICIALIZA VALORES "
Private Sub CargaPermisos()
+ If UsuarioActual.CveRol = 1 Then ChkAgruparAlmacen.Visible = True
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
GvM.Columns(13).Visible = TienePermisoImportes ' costo
GvM.Columns(14).Visible = TienePermisoImportes ' importe
diff --git a/LogIn.aspx b/LogIn.aspx
index b391e24ef..80d75be74 100644
--- a/LogIn.aspx
+++ b/LogIn.aspx
@@ -18,7 +18,7 @@
<%: Styles.Render("~/Metronic/assets/global/css/css") %>
-
+
<%: Scripts.Render("~/bundles/modernizr") %>
@@ -69,13 +69,13 @@
-
+
-
-
+
+
@@ -126,18 +126,33 @@
-
+
+
<%----%>
diff --git a/RH/Organigrama.aspx.vb b/RH/Organigrama.aspx.vb
index 84175ea43..190813a3a 100644
--- a/RH/Organigrama.aspx.vb
+++ b/RH/Organigrama.aspx.vb
@@ -86,14 +86,8 @@ Partial Class RH_Organigrama
CveEmpresaFiltro = UsuarioActual.CveEmpresa
NivelOrg = If(rgx.IsMatch(txtNivel.Text), txtNivel.Text.ToEntero, NivelOrg)
txtNivel.Text = ""
- DdlSupervisorOrganigrama.SelectedIndex = 0
- ScriptManager.RegisterClientScriptBlock(Me, [GetType], "mykey", "drawChart()", True) 'ejecutamos la funcion de js para que haga la consulta de los registros
- End Sub
+ 'DdlSupervisorOrganigrama.SelectedIndex = 0
-#End Region
-
-
- Public Shared Function FetchData() As List(Of Object)
Dim ObjRH As New ClsRH
Dim DtTemporal As New DataTable
Dim chartData As New List(Of Object)()
@@ -110,8 +104,33 @@ Partial Class RH_Organigrama
chartData.Add(New Object() {headerEmpleado, If(nombreEmpleado = nombreSuperior, "", nombreSuperior), puesto})
Next
End If
+ Dim str As String = (New Script.Serialization.JavaScriptSerializer()).Serialize(chartData)
+ LblJson.Text = str
+ 'ScriptManager.RegisterClientScriptBlock(Me, [GetType], "mykey", "drawChart()", True) 'ejecutamos la funcion de js para que haga la consulta de los registros
+ End Sub
- Return chartData
+#End Region
+
+
+ Public Shared Function FetchData() As String
+ Dim ObjRH As New ClsRH
+ Dim DtTemporal As New DataTable
+ Dim chartData As New List(Of Object)()
+
+ If ObjRH.GetOrganigrama(CveEmpresaFiltro, CveCabecera, NivelOrg) Then
+ DtTemporal = ObjRH.DtResultados.Copy
+
+ For Each renglon As DataRow In DtTemporal.Rows
+ Dim nombreEmpleado As String = renglon("nombreEmpleado").ToString
+ Dim nombreSuperior As String = renglon("nombreSuperior").ToString
+ Dim puesto As String = renglon("puesto").ToString
+ Dim headerEmpleado As String = String.Format("{{{2}v{2}:{2}{0}{2},{2}f{2}:{2}{0}
{1}
{2}}}", nombreEmpleado, puesto, ControlChars.Quote) 'este es el JSON que da formato a los subtitulos se hace en String y la funcion lo hace JSON
+
+ chartData.Add(New Object() {headerEmpleado, If(nombreEmpleado = nombreSuperior, "", nombreSuperior), puesto})
+ Next
+ End If
+ Dim str As String = (New Script.Serialization.JavaScriptSerializer()).Serialize(chartData)
+ Return str
End Function
End Class
diff --git a/RH/Personal.aspx b/RH/Personal.aspx
index 9dce78f67..16ff6e369 100644
--- a/RH/Personal.aspx
+++ b/RH/Personal.aspx
@@ -715,7 +715,7 @@
-
+
@@ -723,7 +723,7 @@
-
+
@@ -829,7 +829,7 @@
-
@@ -3861,13 +3861,18 @@
Liberar Uniforme
-
+
-
+
-
+
+
+
+
+
+
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index 117080dbd..50d0a075f 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -271,6 +271,14 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("CveAlmacenUniforme") = value
End Set
+ End Property
+ Private Property CveSeccionAlmacenUniforme As Integer
+ Get
+ Return CInt(ViewState("CveSeccionAlmacenUniforme"))
+ End Get
+ Set(value As Integer)
+ ViewState("CveSeccionAlmacenUniforme") = value
+ End Set
End Property
Private Property DescripcionUniforme As String
@@ -302,7 +310,7 @@ Partial Class RH_Personal
Private Property PU As Decimal
Get
- Return CInt(ViewState("PU"))
+ Return ViewState("PU").ToString.ToDecimal
End Get
Set(value As Decimal)
ViewState("PU") = value
@@ -5080,22 +5088,27 @@ Partial Class RH_Personal
End Sub
Protected Sub LbLiberarUniforme(sender As Object, e As System.EventArgs)
- Dim lb As LinkButton = CType(sender, LinkButton)
-
- Dim row As GridViewRow = CType(lb.NamingContainer, GridViewRow)
- Dim index As Integer = row.DataItemIndex
-
- Dim rowInfo As DataRow = UniformesInfo.Rows(index)
+ Dim lb As LinkButton = CType(sender, LinkButton)
+
+ Dim row As GridViewRow = CType(lb.NamingContainer, GridViewRow)
+
+ CveAlmacenUniforme = row.DataKey("CveAlmacen").ToString().ToEntero
+ DescripcionUniforme = row.DataKey("CodigoPS")
+ PU = row.DataKey("PU").ToString().ToDecimal
+ CveSeccionAlmacenUniforme = row.DataKey("CveSeccionAlmacen").ToString().ToEntero
+ CveUM = row.DataKey("CveUM").ToString().ToEntero
+ CvePS = row.DataKey("CvePS").ToString().ToEntero
+ CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero
+ CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero
+ If row.DataKey("AplicaSeccion").ToString = "True" Then
+ divSeccionAlmacen.Visible = True
+ DdlSeccionAlmacen.Items.Clear()
+ DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePS)
+ DdlSeccionAlmacen.DataBind()
+ End If
- CveAlmacenUniforme = rowInfo.Item("CveAlmacen").ToString().ToEntero
- DescripcionUniforme = rowInfo.Item("CodigoPS").ToString()
- PU = rowInfo.Item("PU").ToString().ToDecimal
-
- CveUM = rowInfo.Item("CveUM").ToString().ToEntero
- CvePS = rowInfo.Item("CvePS").ToString().ToEntero
- CveMovimientoUniforme = rowInfo.Item("CveMovimiento").ToString().ToEntero
- CveMovimientoDetalleUniforme = rowInfo.Item("CveMovimientoDetalle").ToString().ToEntero
+ UPPLiberarUniforme.Update()
RegistraScript(String.Format("$('#{0}').modal();", "ModalUniforme"))
End Sub
@@ -5108,20 +5121,25 @@ Partial Class RH_Personal
Sub LiberarUniforme(sender As Object, e As EventArgs)
- Dim ObjInv As New ClsInventarios
+ Dim ObjInventario As New ClsInventarios
+ ObjInventario.IniciaTransacSQL()
- Dim ResultadoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=CInt(DdlAlmacenDestinoLiberarUniforme.SelectedValue), CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
- Dim ResultadoEntrada As Integer = ObjInv.AddMovimiento(CInt(DdlAlmacenDestinoLiberarUniforme.SelectedValue), 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
-
- Dim ResultadoDetalleSalida As Boolean = ObjInv.AddMovimientoDetalle(ResultadoSalida, 1.0, CveUM, CvePS, PU, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
- Dim ResultadoDetalleEntrada As Boolean = ObjInv.AddMovimientoDetalle(ResultadoEntrada, 1.0, CveUM, CvePS, PU, -1)
+ Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
+ Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
+ Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
+ Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
+ Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen)
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
+ ObjInventario.Commit()
Alert("Uniforme liberado")
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme"))
- CargaUniformesPersonal()
+ CargaUniformesPersonal()
+ Else
+ Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError)
+ ObjInventario.RollBack()
End If
- ObjInv.Dispose()
+ ObjInventario.Dispose()
End Sub
@@ -5130,7 +5148,7 @@ Partial Class RH_Personal
#Region "CARGAR IMAGEN"
Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click
- RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
+ RegistraScript(String.Format("$('#{0}').modal();", "ModalArchivo"))
End Sub
Private Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click