+
+
+
\ No newline at end of file
diff --git a/AF/CatTiposServiciosActividades.aspx.cs b/AF/CatTiposServiciosActividades.aspx.cs
new file mode 100644
index 000000000..80f1e0df3
--- /dev/null
+++ b/AF/CatTiposServiciosActividades.aspx.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Extensiones;
+using System.Data;
+
+public partial class AF_CatTiposServiciosActividades : ClsPaginas
+{
+ private int CveTipoServicioActividad
+ {
+ get
+ {
+ return ViewState["CveTipoServicioActividad"].ToString().ToEntero();
+ }
+
+ set
+ {
+ ViewState["CveTipoServicioActividad"] = value;
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ CargaDatos();
+ }
+ }
+
+ private void CargaDatos()
+ {
+ ClsAF ObjAF = new ClsAF();
+ if (ObjAF.GetTiposServiciosActividades(-1, -1))
+ {
+ GvDatos.DataSource = ObjAF.DtResultados;
+ GvDatos.DataBind();
+ }
+
+ if (ObjAF.GetActividades(-1,-1,-1,UsuarioActual.CveEmpresa))
+ {
+ DdlActividades.DataSource = ObjAF.DtResultados;
+ DdlActividades.DataBind();
+ }
+ ObjAF.Dispose();
+ }
+
+ protected void BtnAgregarTipoServicioD_Click(object sender, EventArgs e)
+ {
+ BtnAgregarTipoServicio.Text = "Agregar";
+ TxtDuracion.Text = "";
+ TxtObservaciones.Text = "";
+ DdlActividades.SelectedValueExist(-1);
+ UpModalTiposD.Update();
+ RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosActividadesD"));
+ }
+
+ protected void LnkEditar_Click(object sender, EventArgs e)
+ {
+ BtnAgregarTipoServicio.Text = "Actualizar";
+ GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
+ CveTipoServicioActividad = GvRow.DataKey("CveTipoServicioActividad").ToEntero();
+ TxtDuracion.Text = GvRow.DataKey("Duracion");
+ TxtObservaciones.Text = GvRow.DataKey("Observaciones");
+ DdlActividades.SelectedValueExist(GvRow.DataKey("CveActividad"));
+ UpModalTiposD.Update();
+ RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosActividadesD"));
+ }
+
+ protected void LnkEliminar_Click(object sender, EventArgs e)
+ {
+ GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
+ CveTipoServicioActividad = GvRow.DataKey("CveTipoServicioActividad").ToEntero();
+ ClsAF ObjAF = new ClsAF();
+ if (ObjAF.DeleteTiposServiciosActividades(CveTipoServicioActividad))
+ {
+ CargaDatos();
+ UpDatos.Update();
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosActividadesD"));
+ Alert("Se eliminó la Actividad del Tipo de Servicio correctamente");
+ }
+ ObjAF.Dispose();
+ }
+
+ protected void BtnAgregarTipoServicio_Click(object sender, EventArgs e)
+ {
+ ClsAF ObjAF = new ClsAF();
+ if (BtnAgregarTipoServicio.Text == "Agregar")
+ {
+ if (ObjAF.AddTiposServiciosActividades(DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text))
+ {
+ Alert("Se agregó la Actividad del Tipo de Servicio correctamente");
+ }
+ }
+ else
+ {
+ if (ObjAF.UpdateTiposServiciosActividades(CveTipoServicioActividad,DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text))
+ {
+ Alert("Se actualizó la Actividad del Tipo de Servicio correctamente");
+ }
+ }
+ ObjAF.Dispose();
+ CargaDatos();
+ UpDatos.Update();
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosActividadesD"));
+ }
+}
\ No newline at end of file
diff --git a/AF/CatTiposServiciosMateriales.aspx b/AF/CatTiposServiciosMateriales.aspx
new file mode 100644
index 000000000..65010d147
--- /dev/null
+++ b/AF/CatTiposServiciosMateriales.aspx
@@ -0,0 +1,98 @@
+<%@ Page Title="AF - Catálogo de Materiales de Tipos de Servicio" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatTiposServiciosMateriales.aspx.cs" Inherits="AF_CatTiposServiciosMateriales" %>
+
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
+
+
+
+
+
+
+ Catálogo de Materiales de Tipos de Servicio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Material de Tipo de Servicio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AF/CatTiposServiciosMateriales.aspx.cs b/AF/CatTiposServiciosMateriales.aspx.cs
new file mode 100644
index 000000000..91633b322
--- /dev/null
+++ b/AF/CatTiposServiciosMateriales.aspx.cs
@@ -0,0 +1,120 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Extensiones;
+using System.Data;
+
+public partial class AF_CatTiposServiciosMateriales : ClsPaginas
+{
+ private int CveTipoServicioMaterial
+ {
+ get
+ {
+ return ViewState["CveTipoServicioMaterial"].ToString().ToEntero();
+ }
+
+ set
+ {
+ ViewState["CveTipoServicioMaterial"] = value;
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ CargaDatos();
+ }
+ }
+
+ private void CargaDatos()
+ {
+ ClsAF ObjAF = new ClsAF();
+ if (ObjAF.GetTiposServiciosMaterial(-1, -1))
+ {
+ GvDatos.DataSource = ObjAF.DtResultados;
+ GvDatos.DataBind();
+ }
+
+ if (ObjAF.GetTiposServicios(-1, -1,-1,UsuarioActual.CveEmpresa))
+ {
+ DdlTipoServicio.DataSource = ObjAF.DtResultados;
+ DdlTipoServicio.DataBind();
+ }
+
+ DdlUM.DataSource = get_GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa);
+ DdlUM.DataBind();
+
+ DdlPS.DataSource = get_GlobalDTPS(UsuarioActual.CveEmpresa);
+ DdlPS.DataBind();
+
+ ObjAF.Dispose();
+ }
+
+ protected void BtnAgregarTipoServicioD_Click(object sender, EventArgs e)
+ {
+ BtnAgregarTipoServicio.Text = "Agregar";
+ TxtCantidad.Text = "";
+ TxtTipo.Text = "";
+ DdlTipoServicio.SelectedValueExist(-1);
+ DdlUM.SelectedValueExist(-1);
+ DdlPS.SelectedValueExist(-1);
+ UpModalTiposD.Update();
+ RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosMaterialD"));
+ }
+
+ protected void LnkEditar_Click(object sender, EventArgs e)
+ {
+ BtnAgregarTipoServicio.Text = "Actualizar";
+ GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
+ CveTipoServicioMaterial = GvRow.DataKey("CveTipoServicioMaterial").ToEntero();
+ TxtCantidad.Text = GvRow.DataKey("Cantidad");
+ TxtTipo.Text = GvRow.DataKey("Tipo");
+ DdlTipoServicio.SelectedValueExist(GvRow.DataKey("CveTipoServicio"));
+ DdlPS.SelectedValueExist(GvRow.DataKey("CvePS"));
+ DdlUM.SelectedValueExist(GvRow.DataKey("CveUM"));
+ UpModalTiposD.Update();
+ RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosMaterialD"));
+ }
+
+ protected void LnkEliminar_Click(object sender, EventArgs e)
+ {
+ GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
+ CveTipoServicioMaterial = GvRow.DataKey("CveTipoServicioMaterial").ToEntero();
+ ClsAF ObjAF = new ClsAF();
+ if (ObjAF.DeleteTiposServiciosMaterial(CveTipoServicioMaterial))
+ {
+ CargaDatos();
+ UpDatos.Update();
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosMaterialD"));
+ Alert("Se eliminó el Material del Tipo de Servicio correctamente");
+ }
+ ObjAF.Dispose();
+ }
+
+ protected void BtnAgregarTipoServicio_Click(object sender, EventArgs e)
+ {
+ ClsAF ObjAF = new ClsAF();
+ if (BtnAgregarTipoServicio.Text == "Agregar")
+ {
+ if (ObjAF.AddTiposServiciosMaterial(DdlTipoServicio.SelectedValue.ToEntero(),TxtCantidad.Text.ToDecimal(),DdlUM.SelectedValue.ToEntero(),DdlPS.SelectedValue.ToEntero(),TxtTipo.Text.ToEntero()))
+ {
+ Alert("Se agregó el Material del Tipo de servicio correctamente");
+ }
+ }
+ else
+ {
+ if (ObjAF.UpdateTiposServiciosMaterial(CveTipoServicioMaterial, DdlTipoServicio.SelectedValue.ToEntero(), TxtCantidad.Text.ToDecimal(), DdlUM.SelectedValue.ToEntero(), DdlPS.SelectedValue.ToEntero(), TxtTipo.Text.ToEntero()))
+ {
+ Alert("Se actualizó el Material del Tipo de servicio correctamente");
+ }
+ }
+ ObjAF.Dispose();
+ CargaDatos();
+ UpDatos.Update();
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosMaterialD"));
+ }
+}
\ No newline at end of file
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb
index 3b6189bef..07ef8202a 100644
--- a/App_Code/ClsAF.vb
+++ b/App_Code/ClsAF.vb
@@ -3732,12 +3732,54 @@ Public Class ClsAF
End Try
Return Retorno
- End Function
+ End Function
+
+ Public Function GetTiposMantenimiento(CveTipoMantenimiento As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_TiposMantenimientoGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTipoMantenimiento", SqlDbType.Int).Value = CveTipoMantenimiento
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los tipos de mantenimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function GetActividades(CveActividad As Integer, CvePuesto As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_ActividadesGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveActividad", SqlDbType.Int).Value = CveActividad
+ .Add("@CvePuesto", SqlDbType.Int).Value = CvePuesto
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener las actividades", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
#End Region
-
-
+
+
#Region " IDisposable Support "
- ' IDisposable
+ ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposedValue Then
If disposing Then
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 03a37d2fa..f7c161809 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -128,6 +128,7 @@ Public Class ClsInventarios
Public Property CveRemanufactura As Integer
Public Property ResponsableCarga As String
Public Property ResponsableRecibio As String
+ Public Property Modulo As String
@@ -851,6 +852,7 @@ Public Class ClsInventarios
PuestoRecibio = dr("PuestoEntrego").ToString
ResponsableCarga = dr("ResponsableCarga").ToString
ResponsableRecibio = dr("ResponsableRecibio").ToString
+ Modulo = dr("Modulo").ToString
Retorno = True
End If
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index bf5a7dea3..628bf554b 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3952,6 +3952,9 @@ Public Class ClsPaginas
PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656)
PaginaDict.Add("/AF/RegistroRevision.aspx".ToUpper(), 1251)
PaginaDict.Add("/AF/RepRevision.aspx".ToUpper(), 1252)
+ PaginaDict.Add("/AF/CatTiposServicios.aspx".ToUpper(), 765)
+ PaginaDict.Add("/AF/CatTiposServiciosActividades.aspx".ToUpper(), 766)
+ PaginaDict.Add("/AF/CatTiposServiciosMateriales.aspx".ToUpper(), 767)
#End Region
'AIMMGM
#Region "AIMMGM"
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index e4cb5ef17..e3592c397 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -445,7 +445,7 @@ Public Class ClsVentas
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") And Ex1.Message.Contains("UK_Ventas_TipoDocto_Serie_Folio_CveSubProyecto") Then
Alert(String.Format("el Folio '{0}' ya se encuentra registrado", FolioFact), TipoMensaje.MsgAdvertencia)
- GuardaLog(String.Format("el folio ya se encuentra registrado {0} {1}", Ex1.Message, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ GuardaLogAD(String.Format("el folio ya se encuentra registrado {0} {1}", Ex1.Message, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
Else
Me.OnError("Ocurrió un error al Guardar la Venta.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 39658a220..5b067c967 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -3518,6 +3518,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString))
params.Add(New ReportParameter("PuestoEntrego", dr("PuestoEntrego").ToString))
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
+ params.Add(New ReportParameter("DepartamentoEntrego", dr("DepartamentoEntrego").ToString))
params.Add(New ReportParameter("Folio", dr("Folio").ToString))
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
params.Add(New ReportParameter("Telefono", dr("Celular").ToString))
diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx
index ac20c6490..5e60f096a 100644
--- a/Contabilidad/RepIVA.aspx
+++ b/Contabilidad/RepIVA.aspx
@@ -126,7 +126,8 @@
-
+
+
@@ -202,6 +203,8 @@
+
+
<%--
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index 39e43da47..7891db1e0 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -3421,6 +3421,7 @@ Partial Class Inventarios_EntradasSalidas
Dim DTOCs As DataTable = DtCostos.FiltraParametros("", "", {"CveOrdenCompraDetalle"})
Dim IdCtaContable As Integer = 0
Dim ConceptoPoliza As String = String.Format("{0}-{1}", DdlConcepto.SelectedItem.Text, If(DdlConcepto.SelectedValue.ToEntero.Contiene(3), HplVenta.Text, TxtFolio.Text))
+ Dim Contabilizable As Boolean = True
If tmpCostos.Rows.Count > 0 Then
Dim Concepto As String = If(TxtObservaciones.Text = "", ConceptoPoliza, $" {TxtObservaciones.Text}")
@@ -3455,44 +3456,51 @@ Partial Class Inventarios_EntradasSalidas
End If
Next
Else
- If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
- 'genero las prepolizas manuales
- Dim tCveConcepto As Integer = 95
- Dim CveCuenta As Integer
- If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
- IdCtaContable = 1
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta) Then
+ If ObjInventario.Modulo = "ASA/G1" Then
+ Contabilizable = False
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
-
End If
-
Else
-
- Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
- Dim tCveConcepto As Integer = 69
- If DdlConcepto.SelectedValue = "30" Then
- tCveConcepto = 181
- IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
- End If
-
- For Each RowInv As DataRow In tmpCostos.Rows
- ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
- If tCveConcepto = 69 Then
- IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
- End If
-
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
+ If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
+ 'genero las prepolizas manuales
+ Dim tCveConcepto As Integer = 95
+ Dim CveCuenta As Integer
+ If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
+ IdCtaContable = 1
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
- Exit For
+
End If
- Next
+ Else
+ Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
+ Dim tCveConcepto As Integer = 69
+ If DdlConcepto.SelectedValue = "30" Then
+ tCveConcepto = 181
+ IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
+ End If
+
+ For Each RowInv As DataRow In tmpCostos.Rows
+ ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
+ If tCveConcepto = 69 Then
+ IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
+ End If
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
+ ErrorMovInv = True
+ Exit For
+ End If
+
+ Next
+
+ End If
End If
End If
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total").RoundSQL) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
End If
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 0c025cc20..c8cc4acb8 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -2366,9 +2366,9 @@ Partial Class Inventarios_EntregaAlmacen
TextoError.AppendFormat("Ocurrió un error, no se tienen registros que ingresar")
Exit Sub
End If
-
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 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("CveSeccionAlmacen").ToString.ToEntero, -1), EsInterno:=EsInterno) Then
+
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 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:=-3, EsInterno:=EsInterno) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For
@@ -2398,7 +2398,7 @@ Partial Class Inventarios_EntregaAlmacen
PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND Serie = '{Dr1("Serie").ToString}'").ToString.ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, Serie:=Dr1("Serie").ToString, 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 Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, Serie:=Dr1("Serie").ToString, 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:=-3) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For
@@ -2410,7 +2410,7 @@ Partial Class Inventarios_EntregaAlmacen
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND Serie = '{Dr1("Serie").ToString}'").ToString.ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, 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 Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, 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:=-3) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For
@@ -2421,7 +2421,7 @@ Partial Class Inventarios_EntregaAlmacen
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero}").ToString.ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, 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 Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, 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:=-3) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.")
Exit For
diff --git a/Inventarios/InventarioFisico.aspx b/Inventarios/InventarioFisico.aspx
index aed516fe4..441bbb7c4 100644
--- a/Inventarios/InventarioFisico.aspx
+++ b/Inventarios/InventarioFisico.aspx
@@ -28,7 +28,7 @@
-
SubProyecto:
+
SubProyecto:
@@ -148,7 +148,7 @@
-
+ SubProyecto:
diff --git a/Inventarios/InventarioFisico.aspx.vb b/Inventarios/InventarioFisico.aspx.vb
index 8e9f7a024..3f8632f2d 100644
--- a/Inventarios/InventarioFisico.aspx.vb
+++ b/Inventarios/InventarioFisico.aspx.vb
@@ -88,6 +88,7 @@ Partial Class Inventarios_InventarioFisico
Inventario.Dispose()
gvIF.DataSource = dt
gvIF.EditIndex = -1
+ gvIF.Columns(1).HeaderText = LblSubProyecto.Text
gvIF.DataBind()
gvIF.Columns(6).Visible = UsuarioActual.TienePermisoProceso(178)
End Sub
@@ -125,11 +126,8 @@ Partial Class Inventarios_InventarioFisico
UPPPSExcluye.Update()
End Sub
Private Sub CargaDdlSubProyectos()
- DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
- DdlSubProyecto.DataBind()
- DdlFiltroSubProyecto.Items.Insert(0, New ListItem("Todas", "-1"))
- DdlFiltroSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
- DdlFiltroSubProyecto.DataBind()
+ CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
+ CargarCentrosDeCosto(Nothing, DdlFiltroSubProyecto, Nothing, LblFiltroSubProyecto)
End Sub
Private Sub CargaDdlClasificacion()
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
@@ -552,6 +550,7 @@ Partial Class Inventarios_InventarioFisico
If ObjInventario.GetInventarioFisico(-1, UsuarioActual.CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue) Then
gvIF.DataSource = ObjInventario.DtResultados
gvIF.DataBind()
+ gvIF.Columns(1).HeaderText = LblSubProyecto.Text
End If
UppInventarioFisico.Update()
ObjInventario.Dispose()
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
index d76c06fd0..7e8f78fbe 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
@@ -211,7 +211,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Dim DtDatos As New DataTable
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimero("")
- Dim AplicaSerie As Boolean = False
+
Dim CveUMTemp = drP("CveUM").ToString.ToEntero
If ObjProductosServicios.GetPaqueteDetalle(DdlPaqueteArmado.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUMTemp, TxtCantidadArmado.Text.ToDouble, DdlAlmacenArmado.SelectedValue.ToEntero, TxtFechaArmado.Text.ToDate, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) Then
DtDatos = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy
@@ -278,8 +278,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
GvDatosArmado.DataSource = DtDatos
GvDatosArmado.DataBind()
+ GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True"
GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True"
- 'GvDatosArmado.Columns(6).Visible = DtDatos.MAX("Serie", "") <> ""
GvDatosArmado.Columns(6).Visible = False 'DtDatos.MAX("Lote", "") <> ""
GvDatosArmado.Columns(7).Visible = False 'DtDatos.MAX("FechaCaducidad", "FechaCaducidad is not null").ToDate > MinFecha
@@ -758,10 +758,10 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
'Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
'e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
- If AplicaSerie Then
- e.Row.FCLinkButton("BtnSeriePaquete").Visible = True
+ 'If AplicaSerie Then
+ e.Row.FCLinkButton("BtnSeriePaquete").Visible = True
e.Row.FCLinkButton("BtnSeriePaquete").Attributes.Add("data-toggle", "tooltip")
- End If
+ 'End If
Else
e.Row.FCButton("BtnSerie").Visible = False
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 54a7daf21..d094c150b 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -616,7 +616,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim ObjInventarios As New ClsInventarios
If ddlProveedor.SelectedValue.ToEntero > 0 Then
- If ObjInventarios.ComprasPendientesAlmacenGet(ddlProveedor.SelectedValue.ToEntero, MinFecha.ToShortDateString.ToDate, UsuarioActual.CveEmpresa) Then
+ If ObjInventarios.ComprasPendientesAlmacenGet(ddlProveedor.SelectedValue.ToEntero, MinFecha.ToShortDateString.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa = 119, "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
DdlFolio.DataSource = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
Else
@@ -695,7 +695,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim ObjInventarios As New ClsInventarios
Dim DtPendientes As New DataTable
- If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveEmpresa) Then
+ If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
Else
@@ -1975,7 +1975,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim CantConsulta = DtDatosImportacion.SUM(VariableCampo)
If CantidadGV <> CantConsulta Then
CargaFleteSurtir(CveFleteSurtir)
- Alert("Ha sido cambiada la informacion de existencias costo indirecto actual, se han recargado la información.", TipoMensaje.MsgAdvertencia)
+ Alert(String.Format("Ha sido cambiada la informacion de existencias costo indirecto actual, se han recargado la información.[{0}-{1}]", CantidadGV, CantConsulta), TipoMensaje.MsgAdvertencia)
ObjComprasDif.Dispose()
Return False
End If
@@ -3151,6 +3151,7 @@ Partial Class Inventarios_RecepcionAlmacen
drc("SubTotal") = drr("SubTotal")
drc("TipoCambio") = drr("TipoCambio")
drc("CveProveedor") = drr("CveProveedor")
+ drc("SubTotalTC") = drr("SubTotalTC")
DtTempCompras.Rows.Add(drc)
End If
diff --git a/Inventarios/RepMaximoMinimo.aspx b/Inventarios/RepMaximoMinimo.aspx
index 902ef3ed4..3be94d878 100644
--- a/Inventarios/RepMaximoMinimo.aspx
+++ b/Inventarios/RepMaximoMinimo.aspx
@@ -277,9 +277,12 @@
-
-
-
+
+
+
+ <%----%>
+ <%----%>
diff --git a/Inventarios/RepMaximoMinimo.aspx.vb b/Inventarios/RepMaximoMinimo.aspx.vb
index 342203af5..4b08f2b3a 100644
--- a/Inventarios/RepMaximoMinimo.aspx.vb
+++ b/Inventarios/RepMaximoMinimo.aspx.vb
@@ -56,17 +56,17 @@ Partial Class Inventarios_RepMaximoMinimo
DdlSubProyecto.Items.Insert(0, New ListItem("Todas", "-1"))
- DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
+ DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlAlmacenModal.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ DdlAlmacenModal.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1)
DdlAlmacenModal.DataBind()
DdlAlmacenModal.Items.Insert(0, New ListItem("Seleccione Almacén", "-1"))
- DdlPSModal.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
- DdlPSModal.DataBind()
- DdlPSModal.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ 'DdlPSModal.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
+ 'DdlPSModal.DataBind()
+ 'DdlPSModal.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpModalMaximoMinimo.Update()
@@ -86,9 +86,9 @@ Partial Class Inventarios_RepMaximoMinimo
DdlAlmacen.Items.Clear()
'If DtSubptoyecto.Rows.Count > 0 Then
'Dim CveSucursal As Integer = DtSubptoyecto(0)("CveSucursal").ToString.ToEntero
- DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveSubProyecto={0}", DdlSubProyecto.SelectedValue.ToEntero))
- DdlAlmacen.DataBind()
- DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(String.Format("CveSubProyecto={0}", DdlSubProyecto.SelectedValue.ToEntero))
+ DdlAlmacen.DataBind()
+ DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
'Else
' DdlAlmacen.DataSource = Nothing
' DdlAlmacen.DataBind()
@@ -195,7 +195,8 @@ Partial Class Inventarios_RepMaximoMinimo
Private Sub LnkDefinir_Click(sender As Object, e As EventArgs) Handles LnkDefinir.Click
HFDefinir.Value = "I"
DdlAlmacenModal.SelectedIndex = 0
- DdlPSModal.SelectedIndex = 0
+ DdlPSModal.SelectedValue = "-1"
+ DdlPSModal.SelectedText = "Seleccione"
TxtMaximo.Text = ""
TxtMinimo.Text = ""
DdlAlmacenModal.Enabled = True
@@ -206,20 +207,26 @@ Partial Class Inventarios_RepMaximoMinimo
End Sub
Private Sub LbAgregarMaximoMinimo_Click(sender As Object, e As EventArgs) Handles LbAgregarMaximoMinimo.Click
- Dim ObjInventario As New ClsInventarios
- If HFDefinir.Value = "I" Then
- If ObjInventario.AddAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
- Alert("El Máximo/Mínimo se agregó correctamente.", TipoMensaje.MsgInformacion)
- End If
- ElseIf HFDefinir.Value = "U" Then
- If ObjInventario.UpdateAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
- Alert("El Máximo/Mínimo se actualizó correctamente.", TipoMensaje.MsgInformacion)
- End If
- End If
+ If DdlPSModal.SelectedValue.ToEntero > 0 Then
- CargaGrid()
- RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalMaximoMinimo"))
- ObjInventario.Dispose()
+ Using ObjInventario As New ClsInventarios
+
+ If HFDefinir.Value = "I" Then
+ If ObjInventario.AddAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
+ Alert("El Máximo/Mínimo se agregó correctamente.", TipoMensaje.MsgInformacion)
+ End If
+ ElseIf HFDefinir.Value = "U" Then
+ If ObjInventario.UpdateAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
+ Alert("El Máximo/Mínimo se actualizó correctamente.", TipoMensaje.MsgInformacion)
+ End If
+ End If
+ End Using
+
+ CargaGrid()
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalMaximoMinimo"))
+ Else
+ Alert("Seleccione un producto o servicio", TipoMensaje.MsgAdvertencia)
+ End If
End Sub
Protected Sub UpdateMaximoMinimo(sender As Object, e As EventArgs)
@@ -227,13 +234,15 @@ Partial Class Inventarios_RepMaximoMinimo
HFDefinir.Value = "U"
Dim CveAlmacen As Integer = GvRow.DataKey("CveAlmacen").ToString.ToEntero
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToString.ToEntero
+ Dim strPS As String = GvRow.DataKey("PS").ToString()
Dim Maximo As String = GvRow.DataKey("Maximo").ToString
Dim Minimo As String = GvRow.DataKey("Minimo").ToString
DdlAlmacenModal.Enabled = False
DdlPSModal.Enabled = False
- DdlAlmacenModal.SelectedValue = CveAlmacen.ToString
+ DdlAlmacenModal.SelectedValue = CveAlmacen.ToString()
+ DdlPSModal.SelectedText = strPS
DdlPSModal.SelectedValue = CvePS.ToString
TxtMaximo.Text = Maximo
TxtMinimo.Text = Minimo
diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx
index 3c6546336..34fce1e71 100644
--- a/Inventarios/TraspasoAlmacen.aspx
+++ b/Inventarios/TraspasoAlmacen.aspx
@@ -119,68 +119,66 @@
-
-
+
+
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 9ef01b59d..d44ee8d3a 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -185,7 +185,9 @@ Partial Class Inventarios_TraspasoAlmacen
If UsuarioActual.CveEmpresa = 119 Then
divGastoIndirecto.Visible = False
+ LblGastoIndirecto.Visible = False
divResponsable.Visible = False
+ LblResponsable.Visible = False
End If
@@ -204,7 +206,10 @@ Partial Class Inventarios_TraspasoAlmacen
End If
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
- If UsuarioActual.CveEmpresa.Contiene(1, 119) Then DivEmitirTimbrado.Visible = True
+ If UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ DivEmitirTimbrado.Visible = True
+ LblEmitirTimbrado.Visible = True
+ End If
CantidadTotal = 0
diff --git a/LogIn.aspx.vb b/LogIn.aspx.vb
index 01bba28d1..94f7e4907 100644
--- a/LogIn.aspx.vb
+++ b/LogIn.aspx.vb
@@ -266,7 +266,7 @@ Partial Class LogIn
userm.Nombre = Usuario.Nombre
userm.Contraseña = Usuario.Contraseña
userm.CvePerfil = Usuario.CveRol
- userm.CveEmpresa = 1 'Usuario.CveEmpresa
+ userm.CveEmpresa = 119 'Usuario.CveEmpresa
userm.CveUsuarioModifico = Usuario.CveEmpresa
userm.CveUsuarioRegistro = Usuario.CveEmpresa
RegistraScript(String.Format("opennewlocation('{0}','{1}')", ReturnUrl, GenerateJSONWebToken(userm)))
diff --git a/RH/MiPerfil.aspx.vb b/RH/MiPerfil.aspx.vb
index 71fbb09af..b2793709e 100644
--- a/RH/MiPerfil.aspx.vb
+++ b/RH/MiPerfil.aspx.vb
@@ -1576,9 +1576,13 @@ end_of_for:
BtnEliminar.Visible = True
- If (EnviarCorreoNuevaSolicitud()) Then
+ Dim Destinatario As String = ""
+ If (UsuarioActual.CveEmpresa.Contiene(72)) Then
+
+ Destinatario = "recursoshumanos@compuproveedores.com"
+ End If
+ If Destinatario.Length > 0 AndAlso (EnviarCorreoNuevaSolicitud(Destinatario)) Then
- Dim Destinatario As String = GlobalDTUsuarios(1781, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo")
Mensaje.AppendLine(String.Format("
Se ha notificado al correo {0}", Destinatario))
End If
Alert(Mensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion)
@@ -1635,7 +1639,7 @@ end_of_for:
End If
End Sub
- Protected Function EnviarCorreoNuevaSolicitud() As Boolean
+ Protected Function EnviarCorreoNuevaSolicitud(Destinatario As String) As Boolean
Dim Correo As New ClsSisMail()
Dim Asunto As String = String.Format("{0} Nueva Solicitud de Viáticos: {1}", UsuarioActual.Empresa.NombreCorto, TxtFolio.Text)
Dim Cuerpo As New StringBuilder()
@@ -1647,14 +1651,8 @@ end_of_for:
If (UsuarioActual.CveEmpresa.Contiene(72, 1, 2)) Then
- Dim Destinatario As String = ""
- If (UsuarioActual.CveEmpresa.Contiene(72)) Then
-
- Destinatario = "recursoshumanos@compuproveedores.com"
- End If
-
- If (Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())) Then
+ If Destinatario.Length > 0 AndAlso (Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())) Then
MensajeEnviado = True
@@ -1831,9 +1829,12 @@ end_of_for:
BtnEliminar.Visible = True
- If (EnviarCorreoNuevaSolicitud()) Then
+ Dim Destinatario As String = ""
+ If (UsuarioActual.CveEmpresa.Contiene(72)) Then
- Dim Destinatario As String = GlobalDTUsuarios(1781, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo")
+ Destinatario = "recursoshumanos@compuproveedores.com"
+ End If
+ If Destinatario.Length > 0 AndAlso (EnviarCorreoNuevaSolicitud(Destinatario)) Then
Mensaje.AppendLine(String.Format("
Se ha notificado al correo {0}", Destinatario))
End If
Alert(Mensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion)
diff --git a/RH/Personal.aspx b/RH/Personal.aspx
index 10a31b1a3..4d16cf36d 100644
--- a/RH/Personal.aspx
+++ b/RH/Personal.aspx
@@ -791,7 +791,7 @@
-
@@ -857,7 +857,7 @@
-
+
@@ -1284,11 +1284,15 @@
+
+
+
+
-
+
@@ -1311,6 +1315,7 @@
+
@@ -1340,6 +1345,7 @@
+
@@ -3858,7 +3864,7 @@
-
Liberar Uniforme
+
Liberar Resguardo
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index b6e87641f..59bbbebb0 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -12,8 +12,8 @@ Imports System.Xml
Imports System.Web.Script.Services
Partial Class RH_Personal
- Inherits ClsPaginas
-
+ Inherits ClsPaginas
+
#Region "P R O P I E D A D E S"
Private Property DTCuentasBancos As DataTable
Get
@@ -331,14 +331,14 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("CveMovimientoDetalleUniforme") = value
End Set
- End Property
-
-
-
+ End Property
+
+
+
#End Region
-
+
#Region "V A C A C I O N E S - P E R M I S O S"
-
+
Private Property VacInicioPeriodo As Date
Get
If ViewState("VacInicioPeriodo") Is Nothing Then
@@ -538,13 +538,13 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("CvePermiso") = value
End Set
- End Property
-
+ End Property
+
#End Region
-
-
+
+
#Region "PROPIEDADES FAMILIARES"
-
+
Private Property ActualizarFamiliar As Boolean
Get
If ViewState("ActualizarFamiliar") Is Nothing Then
@@ -782,7 +782,7 @@ Partial Class RH_Personal
pnlSalarioIMSS.Visible = False
End If
'
-
+ PnlSalarios.Visible = UsuarioActual.Empresa.Funcionalidad(701) = "1"
ViewState("Orden") = ""
ViewState("Orden1") = ""
@@ -970,10 +970,10 @@ Partial Class RH_Personal
Private Sub SetPermisos()
'Permisos
- End Sub
-
+ End Sub
+
#Region "Carga Combos"
-
+
Private Sub CargaEscolaridad()
DdlEscolaridad.DataSource = GlobalDTEscolaridad
DdlEscolaridad.DataBind()
@@ -1204,16 +1204,16 @@ Partial Class RH_Personal
Nom.Dispose()
GvNominas.DataBind()
- End Sub
-
-
-
-
+ End Sub
+
+
+
+
#End Region
-
+
#Region "Asistencias"
-
-
+
+
Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim ObjRH As New ClsRH
@@ -1321,7 +1321,7 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
BtnConsultarAsistencia_Click(sender, e)
- End Sub
+ End Sub
#End Region
Private Sub CargaConsignacion()
@@ -1340,8 +1340,8 @@ Partial Class RH_Personal
ChkEstemporal.Checked = ObjPersonal.DtResultados.Rows(0)("esTemporal").ToString() = "1"
CHKRFCValidado.Checked = ObjPersonal.DtResultados.Rows(0)("RFCValidado").ToString() = "1"
-
- 'Carga Datos Personales
+ TxtMailrecibonomina.Text = ObjPersonal.DtResultados.Rows(0)("MaiReciboNomina").ToString()
+ 'Carga Datos Personales
LtlPersonal.Text = ObjPersonal.NombreCompleto
NombreCompleto = ObjPersonal.NombreCompleto
'TxtNombre.Text = ObjPersonal.Nombre
@@ -1942,11 +1942,11 @@ Partial Class RH_Personal
DdlClienteAsignado.Attributes.Remove("onclick")
DdlClienteAsistenciaC.Attributes.Remove("onclick")
DdlClienteAsistenciaA.Attributes.Remove("onclick")
- End Sub
-
+ End Sub
+
#Region "Buzón de Calidad"
-
-
+
+
Private Sub CargaBuzonCalidad()
Dim ObjPersonal As New ClsRH
@@ -2282,12 +2282,12 @@ Partial Class RH_Personal
End If
GvBuzonCalidad.DataBind()
UpDatos.Update()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Resguardos"
-
+
Protected Sub GvResguardos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvResguardos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2310,13 +2310,13 @@ Partial Class RH_Personal
e.Row.FCLiteral("LtlAF").Text = Liga & e.Row.FCLiteral("LtlAF").Text & ""
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Nómina"
-
-
+
+
Private Sub CarcaConceptosNomina()
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonalConceptos(CvePersonal, UsuarioActual.CveEmpresa) Then
@@ -2505,9 +2505,9 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
End If
- End Sub
+ End Sub
#End Region
-
+
Protected Sub DdlTipoAplicacion_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Ddl As DropDownList = DirectCast(sender, DropDownList)
@@ -2589,10 +2589,10 @@ Partial Class RH_Personal
End If
End If
- End Sub
-
+ End Sub
+
#Region "G A S T O S X C O M P R O B A R"
-
+
Protected Sub RBLTipoGastos_SelectedIndexChanged(sender As Object, e As EventArgs)
If RBLTipoGastos.SelectedValue = "1" Then
@@ -2681,10 +2681,10 @@ Partial Class RH_Personal
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "E V E N T O - B I T A C O R A"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2760,9 +2760,9 @@ Partial Class RH_Personal
HttpContext.Current.Response.End()
Archivo = Nothing
- End Sub
+ End Sub
#End Region
-
+
Protected Sub GvGxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGxC.RowDataBound, GvGxCHistorial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 1 Then
@@ -2815,7 +2815,7 @@ Partial Class RH_Personal
- End Sub
+ End Sub
#Region "TAB BANCOS"
Private Sub CargaMonedas()
DdlMoneda.DataSource = GlobalDTMonedas
@@ -2963,8 +2963,8 @@ Partial Class RH_Personal
ObjCuentasBancos.Dispose()
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
- End Sub
-
+ End Sub
+
#Region "GRIDVIEW - CUENTAS BANCARIAS"
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -3117,11 +3117,11 @@ Partial Class RH_Personal
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
ObjCuentasBancos.Dispose()
CargaGvBitacora()
- End Sub
+ End Sub
#End Region
#End Region
-
-
+
+
#Region "O R D E N A M I E N T O"
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim Orden As String = ""
@@ -3157,10 +3157,10 @@ Partial Class RH_Personal
ViewState("Orden1") = Orden
CargaGvAsistencias()
End If
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "I M P R I M I R N O M I N A"
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
@@ -3168,11 +3168,11 @@ Partial Class RH_Personal
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "Recibo")
- End Sub
-
+ End Sub
+
#End Region
-
-
+
+
#Region " ORGANIGRAMA "
Private Sub CargaSuperioresOrganigrama()
Dim ObjRH As New ClsRH
@@ -3193,10 +3193,10 @@ Partial Class RH_Personal
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "I M P R I M I R "
Private Sub GenerarPDF(Optional Formato As String = "PDF")
@@ -3498,12 +3498,12 @@ Partial Class RH_Personal
End Sub
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
GenerarPDFGastosXComp("Excel")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "D O C U M E N T A C I O N C O N T R A T O S"
-
+
Private Sub CargaDocumentacionFirmaDecontratos()
If CvePersonal > 0 Then
@@ -4220,10 +4220,10 @@ Partial Class RH_Personal
RegistraScript("Download('" & baseUrl & "')")
- End Sub
-
+ End Sub
+
#End Region
-
+
Protected Sub LBCancelar_Click(sender As Object, e As EventArgs)
Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString()
@@ -4244,10 +4244,10 @@ Partial Class RH_Personal
Obj = Nothing
- End Sub
-
+ End Sub
+
#Region "VACACIONES"
-
+
Private Sub CargaVacaciones()
Dim objRH As New ClsRH
@@ -4941,12 +4941,12 @@ Partial Class RH_Personal
objRH.Dispose()
Return ListaTags
- End Function
-
+ End Function
+
#End Region
-
+
#Region "CURSOS"
-
+
Private Sub CargaCursos()
Dim objRH As New ClsRH
@@ -5044,11 +5044,11 @@ Partial Class RH_Personal
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "UNIFORMES"
Private Sub CargaComboUniformes()
@@ -5105,7 +5105,7 @@ Partial Class RH_Personal
Dim ObjInv As New ClsInventarios
- If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal, -1, -1) Then
+ If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal, -1, -1, Todo:=True) Then
GvUniformesResguardo.DataSource = ObjInv.DtResultados
UniformesInfo = ObjInv.DtResultados
Else
@@ -5168,15 +5168,15 @@ Partial Class RH_Personal
Dim ObjInventario As New ClsInventarios
ObjInventario.IniciaTransacSQL()
- 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, CveMovimientoRelacionado:=CveMovimientoUniforme, Observaciones:=DescripcionUniforme, Modulo:="RHLibResg")
+ 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:=CveResultadoSalida, Modulo:="RHLibResg2")
+ 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("Resguardo liberado correctamente")
+ Alert("El resguardo se liberó correctamente")
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme"))
CargaUniformesPersonal()
Else
@@ -5184,12 +5184,12 @@ Partial Class RH_Personal
ObjInventario.RollBack()
End If
ObjInventario.Dispose()
- End Sub
-
-
-
+ End Sub
+
+
+
#End Region
-
+
#Region "CARGAR IMAGEN"
Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchivo"))
@@ -5231,10 +5231,10 @@ Partial Class RH_Personal
TxtCargaImg.Text = "[]"
UpAddArchivo.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
- End Sub
-
+ End Sub
+
#Region "PERMISOS"
-
+
Public Sub CargaPermisos()
Dim ObjRH As New ClsRH
@@ -5360,57 +5360,57 @@ Partial Class RH_Personal
ObjRH.Dispose()
CargaPermisos()
- End Sub
-
-
-
+ End Sub
+
+
+
#End Region
-
-
-
+
+
+
#End Region
-
-
- 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
- ' Preguntar si existe en temporales
- ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) Then
- ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString())
- ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
- ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
- ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
- ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
- ' Else
- ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
- ' End If
-
- ' Else
- ' Imagen Default
- ' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then
- ' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg"
- ' End If
- ' End If
-
-
- ' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = ""
- ' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = ""
-
-
-
-
- ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString()) Then
- ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString())
- ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
- ' Session("FileUpload") = ""
-
- ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
- ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension
-
- ' End If
- ' End If
- 'End Sub
-
+
+
+ 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
+ ' Preguntar si existe en temporales
+ ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) Then
+ ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString())
+ ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
+ ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
+ ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
+ ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
+ ' Else
+ ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
+ ' End If
+
+ ' Else
+ ' Imagen Default
+ ' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then
+ ' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg"
+ ' End If
+ ' End If
+
+
+ ' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = ""
+ ' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = ""
+
+
+
+
+ ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString()) Then
+ ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString())
+ ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
+ ' Session("FileUpload") = ""
+
+ ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
+ ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension
+
+ ' End If
+ ' End If
+ 'End Sub
+
#Region "Consumos"
-
+
Private Sub Consumos()
Dim ObjCompras As New ClsCompras
@@ -5489,10 +5489,10 @@ Partial Class RH_Personal
End Sub
Protected Sub LnkImprimirPDFConsumo_Click(sender As Object, e As EventArgs)
GenerarPDFConsumo()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region ""
Protected Sub LbMail_Click(sender As Object, e As EventArgs)
@@ -5576,9 +5576,9 @@ Partial Class RH_Personal
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "VIATICOS"
Protected Sub CargaViaticosPersonal()
Dim ObjBancos As ClsBancos = New ClsBancos
@@ -5613,11 +5613,11 @@ Partial Class RH_Personal
If (e.Row.RowType = DataControlRowType.Footer) Then
e.Row.FCLiteral("LtTotalImporte").Text = DTViaticosDetalle.SUM("Importe").FormatoNumero()
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "BITACORA"
-
+
Private Sub CargaGvBitacora()
If CvePersonal > 0 Then
@@ -5630,12 +5630,12 @@ Partial Class RH_Personal
UpHistorialModificacion.Update()
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "PAGO DE FACTURAS"
-
+
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaPagoFactura()
UpnHistorial.Update()
@@ -5648,10 +5648,10 @@ Partial Class RH_Personal
End If
ObjRH.Dispose()
GVPagoFactura.DataBind()
- End Sub
-
+ End Sub
+
#End Region
-
+
Protected Sub BtnSaldoInicial_Click(sender As Object, e As EventArgs)
Dim SaldoInicial As Double = TxtSaldoInicial.Text.ToDouble()
Dim Fecha As DateTime = TxtFechaSaldo.Text.ToDateTime()
@@ -5667,8 +5667,8 @@ Partial Class RH_Personal
End Sub
Private Function AgregarSaldoInicial(SaldoInicial As Double, Fecha As DateTime, CveMoneda As Integer, ObjMov As ClsContabilidad) As Integer
Return ObjMov.AddPrePolizas("RH/Personal", 13, SaldoInicial, SaldoInicial, CveMoneda, Fecha, "Saldo Inicial", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- End Function
-
+ End Function
+
#Region "L I C E N C I A S"
Public Sub CargaLicencias()
If CvePersonal > 0 Then
@@ -5815,7 +5815,7 @@ Partial Class RH_Personal
End If
RegistraScript("$('#DivAddLicencias').modal('hide');")
- End Sub
+ End Sub
#End Region
Protected Sub BtnPDFResguardo_Click(sender As Object, e As EventArgs)
GenerarPDFResguardosAF()
@@ -5892,12 +5892,12 @@ Partial Class RH_Personal
Alert("No se encontraron registros .", TipoMensaje.MsgAdvertencia)
End If
- End Sub
-
-
+ End Sub
+
+
#Region "FAMILIARES"
-
-
+
+
Private Sub CargaFamiliares()
If CvePersonal <> -1 Then
@@ -6148,11 +6148,11 @@ Partial Class RH_Personal
'objRH.Dispose()
- End Sub
-
+ End Sub
+
#End Region
-
-
+
+
Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
diff --git a/RH/SolicitudViaticos.aspx.cs b/RH/SolicitudViaticos.aspx.cs
index 26109a0d1..cd34023b5 100644
--- a/RH/SolicitudViaticos.aspx.cs
+++ b/RH/SolicitudViaticos.aspx.cs
@@ -519,9 +519,14 @@ public partial class RH_SolicitudViaticos : ClsPaginas
BtnEliminar.Visible = true;
- if (EnviarCorreoNuevaSolicitud())
+ string Destinatario = "";
+
+ if (UsuarioActual.CveEmpresa.Contiene(72))
{
- String Destinatario = get_GlobalDTUsuarios(1781, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo");
+ Destinatario = "recursoshumanos@compuproveedores.com";
+ }
+ if (EnviarCorreoNuevaSolicitud(Destinatario))
+ {
Mensaje.AppendLine(String.Format("
Se ha notificado al correo {0}", Destinatario));
}
Alert(Mensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
@@ -745,7 +750,7 @@ public partial class RH_SolicitudViaticos : ClsPaginas
#endregion
#region "ENVIO DE CORREOS"
- protected Boolean EnviarCorreoNuevaSolicitud()
+ protected Boolean EnviarCorreoNuevaSolicitud(string Destinatario)
{
ClsSisMail Correo = new ClsSisMail();
String Asunto = String.Format("{0} Nueva Solicitud de Viáticos: {1}", UsuarioActual.Empresa.NombreCorto, TxtFolio.Text);
@@ -758,14 +763,8 @@ public partial class RH_SolicitudViaticos : ClsPaginas
if (UsuarioActual.CveEmpresa.Contiene(72, 1, 2))
{
- String Destinatario = "";
- if (UsuarioActual.CveEmpresa.Contiene(72))
- {
- Destinatario = "recursoshumanos@compuproveedores.com";
- }
-
- if (Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString()))
+ if (Destinatario.Length > 0 && Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString()))
{
MensajeEnviado = true;
}
diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb
index 32bd90384..ceeb01198 100644
--- a/Sistemas/CatSesiones.aspx.vb
+++ b/Sistemas/CatSesiones.aspx.vb
@@ -568,6 +568,7 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaDTInvPSSeccionesAlmacen()
GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, -1, -1) = Nothing
+ GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = Nothing
End Sub
End Class
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index c99cb1fd4..c17d1f432 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -10279,15 +10279,15 @@ Partial Class Ventas
If IngresoIVA > 0 Then
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
Exit For
End If
'IVA PAGADO
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
Exit For
End If
@@ -10296,15 +10296,15 @@ Partial Class Ventas
If IngresoIEPS > 0 Then
'IEPS X TRASLADAR
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
+ If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
End If
'IEPS PAGADO
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
+ If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
End If
@@ -10642,8 +10642,11 @@ Partial Class Ventas
'CTACONTABLE
'IdCtaContable = IdCtaContAnticipos
'CveCuenta = CveCuentaAnticipos
- IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
- CveCuenta = ObjFactura.Cliente.CveCuentaClientes
+ If tipoCambio = 1 Then
+ IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
+ Else
+ IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
+ End If
CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -11510,6 +11513,7 @@ Partial Class Ventas
CveProducto = Dr("CvePS").ToString().ToEntero()
CveUnidad = Dr("CveUM").ToString().ToEntero()
Cantidad = Dr("Cantidad").ToString().ToDouble
+ Dim AplicaSeccion As Boolean = CBool(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSeccion"))
If Dr("CveTipoInvPS").ToString().ToEntero() = 5 And Dr("Serie").ToString() = "" Then
OcurrioError = True
@@ -11550,8 +11554,10 @@ Partial Class Ventas
Exit For
End If
End If
+ Dim CveSeccionAlmacen As Integer = -1
+ If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
OcurrioError = True
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario. ")
Exit For
diff --git a/vwd.webinfo b/vwd.webinfo
index 4edae1c8c..2fd2ac3b0 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -84,6 +84,10 @@
+
+
+
+