+
+
+
+
+
Automatico Global:
+
+
Automatico Liquidación:
+
+
+
+
Especie:
+
+
Imprimir:
+
+
+
+
+
+
+
+<%--
+
+
--%>
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- <%-- --%>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+ <%: System.Web.Optimization.Scripts.Render("~/Metronic/assets/global/plugins/codemirror/JS") %>
+ <%: System.Web.Optimization.Scripts.Render("~/Metronic/assets/global/plugins/jstree/dist/jstree.min.js") %>
+
+
+
diff --git a/Nomina/ConceptoNomina.aspx.cs b/Nomina/ConceptoNomina.aspx.cs
index d8088ac08..0b80caa9a 100644
--- a/Nomina/ConceptoNomina.aspx.cs
+++ b/Nomina/ConceptoNomina.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
+using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -53,10 +54,124 @@ public partial class Nomina_CatConcepto : ClsPaginas
{
if (!IsPostBack)
{
+ tree_Tables();
InicializaDatos();
}
}
+ #region Arboles conceptos
+ DataTable dtrefrencias;
+ StringBuilder strKeys;
+ StringBuilder strKeys2;
+ StringBuilder strKeys3;
+ public void tree_Tables()
+ {
+ ClsNominas objnom = new ClsNominas();
+ strKeys = new StringBuilder();
+ strKeys2 = new StringBuilder();
+ strKeys3 = new StringBuilder();
+ StringBuilder tablaarbol = new StringBuilder();
+ objnom.GetNom_Refencias();
+ dtrefrencias = objnom.DtResultados;
+ objnom.Dispose();
+ strKeys.Append("{");
+ int tipo = 1;
+ #region tablas
+ tablaarbol.AppendLine("");
+ foreach (DataRow row in dtrefrencias.FiltraParametros($"Nivel=0 AND Tipo ={tipo}").Rows)
+ {
+ AddchildtoEnd(ref tablaarbol, row, " ", " ", tipo);
+ }
+ tablaarbol.AppendLine(" ");
+ LtlArbolTabla.Text = tablaarbol.ToString();
+ #endregion
+
+ #region Formulas
+ tablaarbol.Clear();
+ tipo = 2;
+ tablaarbol.AppendLine("");
+ foreach (DataRow row in dtrefrencias.FiltraParametros($"Nivel=0 AND Tipo ={tipo}").Rows)
+ {
+ AddchildtoEnd(ref tablaarbol, row, " ", " ", tipo);
+ }
+ tablaarbol.AppendLine(" ");
+ LtlArbolFormulas.Text = tablaarbol.ToString();
+ #endregion
+
+ #region Funciones
+ tablaarbol.Clear();
+ tipo = 3;
+ tablaarbol.AppendLine("");
+ foreach (DataRow row in dtrefrencias.FiltraParametros($"Nivel=0 AND Tipo ={tipo}").Rows)
+ {
+ AddchildtoEnd(ref tablaarbol, row, " ", " ", tipo);
+ }
+ tablaarbol.AppendLine(" ");
+ LtlArbolFunciones.Text = tablaarbol.ToString();
+ #endregion
+
+
+
+ if (strKeys.Length > 2)
+ {
+ strKeys.Remove(1, 1);
+ }
+ strKeys.Append("}");
+ LtlKeys.Text = string.Format(" MycurrentT ={0} ; strKeys2='{1}'; strKeys3='{2}'; ", strKeys.ToString(), strKeys2.ToString(), strKeys3.ToString());
+ UpTablas.Update();
+ //TxtMycurrentT.Text = strKeys.ToString();
+ //TxtstrKeys2.Text = strKeys2.ToString();
+ //TxtstrKeys3.Text = strKeys3.ToString();
+
+ }
+ public void AddchildtoEnd(ref StringBuilder tablaarbol, DataRow item, string identacion, string identacion2, int tipo)
+ {
+ string identacion3 = string.Format("{0}{1}", identacion, identacion2);
+ DataTable dt = dtrefrencias.FiltraParametros($"CveNomReferenciaPadre={item["CveNomReferencia"].ToString().ToEntero()} AND Nivel= {(item["Nivel"].ToString().ToEntero() + 1)} AND Tipo ={tipo}");
+ string data_jstree = "";
+ if (dt.Rows.Count == 0)
+ {
+ data_jstree = "data-jstree='{ \"icon\" : \"fa fa-file icon-state-info \" }'";
+ }
+ tablaarbol.AppendLine(string.Format("{0}", identacion, data_jstree));
+ tablaarbol.AppendLine("");
+ tablaarbol.Append(identacion3);
+ if (item["EsUltimo"].ToString() == "1")
+ {
+ tablaarbol.Append(" ");
+ string campo = item["Campo"].ToString();
+ if (tipo < 3)
+ {
+ strKeys2.Append(string.Format(" {0}", campo));
+ }
+ else
+ {
+ string[] scampos = campo.Split('(');
+ campo = "";
+ if (scampos.Length > 0)
+ {
+ campo = scampos[0].Trim();
+ }
+ strKeys3.Append(string.Format(" {0}", campo));
+ }
+ strKeys.Append(string.Format(",'{0}':[]", campo));
+ }
+ tablaarbol.Append(item["Texto"]);
+ if (item["EsUltimo"].ToString() == "1") { tablaarbol.Append(" "); }
+ tablaarbol.AppendLine("");
+ if (dt.Rows.Count > 0)
+ {
+ tablaarbol.AppendLine(string.Format("{0}", identacion3));
+ foreach (DataRow row in dt.Rows)
+ {
+ AddchildtoEnd(ref tablaarbol, row, identacion3, identacion2, tipo);
+ }
+ tablaarbol.AppendLine(string.Format("{0} ", identacion3));
+ }
+ tablaarbol.AppendLine(string.Format("{0} ", identacion));
+
+ }
+ #endregion
protected void InicializaDatos()
{
if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
@@ -260,7 +375,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
TxtCodigo.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Codigo");
TxtConcepto.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Concepto");
DdlTipo.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("Tipo"));
- TxtFormula.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Formula");
+ TxtFormulaTotal.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Formula");
if (ObjNomina.DtResultados.FiltroPrimeroValor("EsRetencion").Equals("1")) ChkRetencion.Checked = true;
if (ObjNomina.DtResultados.FiltroPrimeroValor("TipoCalculo").Equals("True")) ChkTipoCalculo.Checked = true;
DdlConceptoPadre.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoPadre"));
@@ -307,4 +422,26 @@ public partial class Nomina_CatConcepto : ClsPaginas
Alert("Ocurrio un error al eliminar el concepto de nómina", ModExtensiones.TipoMensaje.MsgError);
}
}
+
+ protected void LnkActualizarFormula_Click(object sender, EventArgs e)
+ {
+ tree_Tables();
+ string tipo = "Total";
+ if (TabsFormulas.ActiveTab == tabFormulaTotal)
+ {
+ tipo = "Total";
+ }
+ if (TabsFormulas.ActiveTab == tabFormulaGravada)
+ {
+ tipo = "Gravada";
+ }
+ LtlTituloFormula.Text = $"Actualizar Formula {tipo}";
+ RegistraScript("$('#ModalDivFormula').modal()");
+ UpModalFormulas.Update();
+ }
+
+ protected void BtnUpFormula_Click(object sender, EventArgs e)
+ {
+
+ }
}
\ No newline at end of file
diff --git a/Nomina/ConceptoNominaB.aspx b/Nomina/ConceptoNominaB.aspx
new file mode 100644
index 000000000..16363b350
--- /dev/null
+++ b/Nomina/ConceptoNominaB.aspx
@@ -0,0 +1,179 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ConceptoNominaB.aspx.cs" Inherits="Nomina_CatConceptob" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nomina/ConceptoNominaB.aspx.cs b/Nomina/ConceptoNominaB.aspx.cs
new file mode 100644
index 000000000..8a4a3f293
--- /dev/null
+++ b/Nomina/ConceptoNominaB.aspx.cs
@@ -0,0 +1,310 @@
+using Extensiones;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+public partial class Nomina_CatConceptoB : ClsPaginas
+{
+ #region "Propiedades"
+ private DataTable DTCuentas
+ {
+ get
+ {
+ return (DataTable)ViewState["DTCuentas"];
+ }
+
+ set
+ {
+ ViewState["DTCuentas"] = value;
+ }
+ }
+ private Boolean EsEditar
+ {
+ get
+ {
+ return (Boolean)ViewState["EsEditar"];
+ }
+
+ set
+ {
+ ViewState["EsEditar"] = value;
+ }
+ }
+ private int CveConcepto
+ {
+ get
+ {
+ return ViewState["CveConcepto"].ToEntero();
+ }
+
+ set
+ {
+ ViewState["CveConcepto"] = value;
+ }
+ }
+
+ #endregion
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ InicializaDatos();
+ }
+ }
+
+ protected void InicializaDatos()
+ {
+ if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
+ {
+ ViewState["CveConcepto"] = Request["CveConcepto"];
+ EsEditar = true;
+ BtnGuardar.Text = "Guardar cambios";
+ BtnEliminar.Visible = true;
+ ChkTipoCalculo.Checked = false;
+ }
+ else
+ {
+ ViewState["CveConcepto"] = -1;
+ EsEditar = false;
+ }
+ CargaTipo();
+ CargaConceptoPadre();
+ CargaConceptoContable();
+
+ CargaClasificacion();
+ CargaTipoGasto();
+ CargaCtaContable();
+
+ CargaDatos();
+ }
+
+ protected void CargaTipo()
+ {
+ DdlTipo.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ DdlTipo.Items.Insert(1, new ListItem("Percepciones", "P"));
+ DdlTipo.Items.Insert(2, new ListItem("Deducciones", "D"));
+ DdlTipo.Items.Insert(3, new ListItem("Obligaciones", "O"));
+ DdlTipo.SelectedValueExist("-1");
+ }
+
+ protected void CargaConceptoPadre()
+ {
+ DdlConceptoPadre.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa);
+ DdlConceptoPadre.DataBind();
+ DdlConceptoPadre.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ DdlConceptoPadre.SelectedValueExist("-1");
+ }
+ protected void CargaConceptoContable()
+ {
+ DdlConceptoContable.DataSource = get_GlobalDTContaConceptosContables(-1);
+ DdlConceptoContable.DataBind();
+ DdlConceptoContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ DdlConceptoContable.SelectedValueExist("-1");
+ }
+ protected void CargaClasificacion()
+ {
+ DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
+ DdlClasificacion.DataBind();
+ DdlClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ DdlClasificacion.SelectedValueExist("-1");
+ }
+
+ protected void CargaTipoGasto()
+ {
+ DdlTipoGasto.DataSource = get_GlobalDTTiposGastos(UsuarioActual.CveEmpresa);
+ DdlTipoGasto.DataBind();
+ DdlTipoGasto.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ DdlTipoGasto.SelectedValueExist("-1");
+ }
+
+ protected void CargaCtaContable()
+ {
+ if(UsuarioActual.Empresa.UsaContabilidad)
+ {
+ ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa);
+ if (ObjConta.GetCuentas(-1, "-1", 1))
+ {
+ DdlCtaContable.DataSource = ObjConta.DtResultados;
+ DdlCtaContable.DataBind();
+ }
+
+ DdlCtaContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ DdlCtaContable.SelectedValueExist("-1");
+ }
+ }
+
+
+ protected void BtnGuardar_Click(object sender, EventArgs e)
+ {
+ String codigo = TxtCodigo.Text;
+ String concepto = TxtConcepto.Text;
+ String tipo = DdlTipo.SelectedValue;
+ String formula = TxtFormula.Text;
+
+ if (!ValidaFormula(formula).Equals(""))
+ {
+ Alert("Fórmula no válida. Favor de ingresar una correcta.", ModExtensiones.TipoMensaje.MsgError);
+ }
+ else
+ {
+ bool retencion;
+ if (ChkRetencion.Checked) retencion = true;
+ else retencion = false;
+
+ bool tipoCalculo;
+ if (ChkTipoCalculo.Checked) tipoCalculo = true;
+ else tipoCalculo = false;
+
+ int CveConceptoPadre = DdlConceptoPadre.SelectedValue.ToEntero();
+ int CveConceptoContable = DdlConceptoContable.SelectedValue.ToEntero();
+
+ bool estado;
+ if (ChkEstado.Checked) estado = true;
+ else estado = false;
+
+ bool sistema;
+ if (ChkSistema.Checked) sistema = true;
+ else sistema = false;
+
+ int CveClasificacion = DdlClasificacion.SelectedValue.ToEntero();
+ int CveTipoGasto = DdlTipoGasto.SelectedValue.ToEntero();
+ int IdCtaContable = DdlCtaContable.SelectedValue.ToEntero();
+
+ ClsNominas ObjNomina = new ClsNominas();
+ ObjNomina.IniciaTransacSQL();
+
+ bool TieneError = false;
+
+ if (EsEditar)
+ {
+ TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable);
+
+ if (TieneError)
+ {
+ ObjNomina.RollBack();
+ }
+ else
+ {
+ ObjNomina.Commit();
+ Alert("El concepto de nómina fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
+ }
+ }
+ else
+ {
+ CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable);
+
+ if (CveConcepto == -1)
+ {
+ ObjNomina.RollBack();
+ }
+ else
+ {
+ ObjNomina.Commit();
+ Alert("El concepto de nómina fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
+ }
+ }
+
+ ObjNomina.Dispose();
+ CargaDatos();
+ }
+ }
+
+ private string ValidaFormula(string Formula)
+ {
+ string retorno = "Error en Fórmula";
+
+ try
+ {
+ FormulaEvaluator.Expression exp;
+ foreach (DataRow dr in GlobalDTNomConceptosFunciones.Rows)
+ {
+ exp = new FormulaEvaluator.Expression(String.Format("{0}:=1", dr["Funcion"]));
+ exp.Eval();
+ }
+
+ exp = new FormulaEvaluator.Expression(Formula);
+ if (exp.Errors.Count > 0)
+ {
+ retorno = exp.Errors[0].Message;
+ }
+ Object val = exp.Eval();
+ if (exp.Errors.Count == 0)
+ {
+ retorno = "";
+ }
+ else
+ {
+ retorno = exp.Errors[0].Message;
+ }
+ }
+ catch (Exception e) {
+ Alert(e.Message,ModExtensiones.TipoMensaje.MsgError);
+ }
+
+ return retorno;
+ }
+
+ protected void CargaDatos()
+ {
+ if(CveConcepto > 0)
+ {
+ ClsNominas ObjNomina = new ClsNominas();
+
+ if (ObjNomina.GetConceptos(UsuarioActual.CveEmpresa, CveConcepto: CveConcepto) && ObjNomina.DtResultados.Rows.Count > 0)
+ {
+ TxtCodigo.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Codigo");
+ TxtConcepto.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Concepto");
+ DdlTipo.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("Tipo"));
+ TxtFormula.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Formula");
+ if (ObjNomina.DtResultados.FiltroPrimeroValor("EsRetencion").Equals("1")) ChkRetencion.Checked = true;
+ if (ObjNomina.DtResultados.FiltroPrimeroValor("TipoCalculo").Equals("True")) ChkTipoCalculo.Checked = true;
+ DdlConceptoPadre.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoPadre"));
+ DdlConceptoContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoContable"));
+
+ if (ObjNomina.DtResultados.FiltroPrimeroValor("Estado").Equals("Activo")) ChkEstado.Checked = true;
+ if (ObjNomina.DtResultados.FiltroPrimeroValor("Sistema").Equals("Sí")) ChkSistema.Checked = true;
+
+ DdlClasificacion.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveClasificacion"));
+ DdlTipoGasto.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveTipoGasto"));
+ DdlCtaContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("IdCtaContable"));
+ }
+ ObjNomina.Dispose();
+
+ } else
+ {
+ TxtCodigo.Text = "";
+ TxtConcepto.Text = "";
+ DdlTipo.SelectedValueExist("-1");
+ TxtFormula.Text = "";
+ ChkRetencion.Checked = false;
+ DdlConceptoPadre.SelectedValueExist("-1");
+ DdlConceptoContable.SelectedValueExist("-1");
+
+ ChkEstado.Checked = false;
+ ChkSistema.Checked = false;
+
+ DdlClasificacion.SelectedValueExist("-1");
+ DdlTipoGasto.SelectedValueExist("-1");
+ DdlCtaContable.SelectedValueExist("-1");
+ }
+ }
+
+ protected void BtnEliminar_Click(object sender, EventArgs e)
+ {
+ ClsNominas ObjNomina = new ClsNominas();
+
+ if (ObjNomina.RemoveConcepto(CveConcepto, UsuarioActual.CveEmpresa))
+ {
+ Response.Redirect("./CatConceptos.aspx");
+ }
+ else
+ {
+ Alert("Ocurrio un error al eliminar el concepto de nómina", ModExtensiones.TipoMensaje.MsgError);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx
new file mode 100644
index 000000000..4c9a88951
--- /dev/null
+++ b/Nomina/Nomina2.aspx
@@ -0,0 +1,221 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Nomina2.aspx.cs" Inherits="Nomina_Nomina2" %>
+
+
+
+
+
+
+ Nominas
+
+
+
+
+
+
+
+
+ Cargar Nomina
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Ejercicio:
+
+
+
Tipo Período:
+
+
+
Período:
+
+
+
+
+
+
+
+
Agrupador:
+
+
Proyecto:
+
+
+
SubProyecto:
+
+
+
Turno:
+
+
Fecha Pago:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nombre
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -recuerda Solo editar de las tercer fila en adelante.
+ -No se debe editar el nombre de la hoja 'Nomina'.
+ -la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.
+ -si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.
+ -si no desea insertar un concepto puede borrar la columna.
+ -no se debe borrar la columna codigo.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nomina/Nomina2.aspx.cs b/Nomina/Nomina2.aspx.cs
new file mode 100644
index 000000000..b61965b83
--- /dev/null
+++ b/Nomina/Nomina2.aspx.cs
@@ -0,0 +1,674 @@
+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;
+using System.Text;
+
+public partial class Nomina_Nomina2 : ClsPaginas
+{
+ #region Propiedades
+ private DataTable dtPeriodos
+ {
+ get
+ {
+ if (ViewState["dtPeriodos"] == null) { return null; }
+ else { return (DataTable)ViewState["dtPeriodos"]; }
+ }
+
+ set { ViewState["dtPeriodos"] = value; }
+ }
+ private DataTable dtConceptos
+ {
+ get
+ {
+ if (ViewState["dtConceptos"] == null) { return null; }
+ else { return (DataTable)ViewState["dtConceptos"]; }
+ }
+
+ set { ViewState["dtConceptos"] = value; }
+ }
+ private DataTable dtempleados
+ {
+ get
+ {
+ if (ViewState["dtempleados"] == null) { return null; }
+ else { return (DataTable)ViewState["dtempleados"]; }
+ }
+
+ set { ViewState["dtempleados"] = value; }
+ }
+
+ protected bool PermisoCancelarEmitido
+ {
+ get
+ {
+ if (ViewState["PermisoCancelarEmitido"] == null) { return false; }
+ else { return (bool)ViewState["PermisoCancelarEmitido"]; }
+ }
+
+ set { ViewState["PermisoCancelarEmitido"] = value; }
+ }
+ protected bool PermisoAutorizar
+ {
+ get
+ {
+ if (ViewState["PermisoAutorizar"] == null) { return false; }
+ else { return (bool)ViewState["PermisoAutorizar"]; }
+ }
+
+ set { ViewState["PermisoAutorizar"] = value; }
+ }
+ protected bool PermisoEmitir
+ {
+ get
+ {
+ if (ViewState["PermisoEmitir"] == null) { return false; }
+ else { return (bool)ViewState["PermisoEmitir"]; }
+ }
+
+ set { ViewState["PermisoEmitir"] = value; }
+ }
+ protected int CvePeriodoSeleccionado
+ {
+ get
+ {
+ if (ViewState["CvePeriodoSeleccionado"] == null) { return 0; }
+ else { return ViewState["CvePeriodoSeleccionado"].ToString().ToEntero(); }
+ }
+
+ set { ViewState["CvePeriodoSeleccionado"] = value; }
+ }
+ #endregion
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ cargaEjercicios();
+ CargaTiposPeriodo();
+ cargaPeriodos();
+ //Permisos
+ if (UsuarioActual.TienePermisoProceso(82))
+ {
+ PermisoAutorizar = true;
+ }
+ else
+ {
+ PermisoAutorizar = false;
+ }
+ if (UsuarioActual.TienePermisoProceso(83))
+ {
+ PermisoEmitir = true;
+ PermisoCancelarEmitido = true;
+ }
+ else
+ {
+ PermisoEmitir = false;
+ PermisoCancelarEmitido = false;
+ }
+ }
+
+ }
+ #region Filtros
+ private void cargaEjercicios()
+ {
+ int EjercicioActual = UsuarioActual.Empresa.EjercicioActual;
+ DataTable dtejercicio = null;
+ using (ClsNominas objnom = new ClsNominas())
+ {
+ if (objnom.GetEjercicios(UsuarioActual.CveEmpresa))
+ {
+ dtejercicio = objnom.DtResultados;
+ }
+ }
+ DdlEjercicios.DataSource = dtejercicio;
+ DdlEjercicios.DataBind();
+ if ((dtejercicio != null) && dtejercicio.Rows.Count > 0)
+ {
+ if (dtejercicio.COUNT("Ejercicio", string.Format("Ejercicio={0}", EjercicioActual)) == 0)
+ {
+ DdlEjercicios.Items.Insert(0, new ListItem(EjercicioActual.ToString(), EjercicioActual.ToString()));
+ }
+ if (dtejercicio.COUNT("Ejercicio", string.Format("Ejercicio={0}", (EjercicioActual - 1))) == 0)
+ {
+ DdlEjercicios.Items.Insert(1, new ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString()));
+ }
+ }
+ else
+ {
+ DdlEjercicios.Items.Add(new ListItem(EjercicioActual.ToString(), EjercicioActual.ToString()));
+ DdlEjercicios.Items.Add(new ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString()));
+
+ }
+ if (DdlEjercicios.Items.Count > 0)
+ {
+ DdlEjercicios.SelectedIndex = 0;
+ }
+ }
+ private void CargaTiposPeriodo()
+ {
+ DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'");
+ DdlTipoPeriodo.DataBind();
+ DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ if (DdlTipoPeriodo.Items.Count > 0)
+ {
+ DdlTipoPeriodo.SelectedIndex = 0;
+ }
+ }
+ private void cargaPeriodos()
+ {
+ int tipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
+ int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
+ dtPeriodos = null;
+ if (DdlTipoPeriodo.SelectedValue.ToEntero() > 0)
+ {
+ using (ClsNominas objperiodos = new ClsNominas())
+ {
+ if (objperiodos.GetPeriodos(tipoPeriodo, UsuarioActual.CveEmpresa, ejercicio, -1, -1))
+ {
+ dtPeriodos = objperiodos.DtResultados.FiltraParametros("Estatus IN (1,2,3,4,5)");
+ }
+ }
+ }
+ DdlPeriodo.DataSource = dtPeriodos;
+ DdlPeriodo.DataBind();
+ DdlPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ muestraPeriodo();
+ }
+
+ protected void DdlEjercicios_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ cargaPeriodos();
+ }
+
+ protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ cargaPeriodos();
+ }
+
+ protected void DdlPeriodo_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ muestraPeriodo();
+ }
+ private void muestraPeriodo()
+ {
+ int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
+ LnkConsultar.Visible = (CvePeriodo > 0);
+ UPFiltros.Update();
+ UpDatos.Update();
+ }
+ #endregion
+ #region Datos
+
+ protected void LnkConsultar_Click(object sender, EventArgs e)
+ {
+ bool continuar = false;
+ int CveProyecto = DdlProyecto.SelectedValue.ToEntero();
+ int CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero();
+ int CveTurno = DdlTurno.SelectedValue.ToEntero();
+ int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
+ int CveEmpresa = UsuarioActual.CveEmpresa;
+ int Agrupador = DdlAgrupador.SelectedValue.ToEntero();
+
+ CvePeriodoSeleccionado = 0;
+ dtempleados = null;
+ dtConceptos = null;
+ using (ClsNominas objnom = new ClsNominas())
+ {
+ if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador) && objnom.DTSetResultados.Tables.Count > 1)
+ {
+ dtempleados = objnom.DTSetResultados.Tables[0];
+ dtConceptos = objnom.DTSetResultados.Tables[1];
+ CvePeriodoSeleccionado = CvePeriodo;
+ continuar = true;
+ }
+
+ }
+ #region CargaGrid
+ if (continuar)
+ {
+
+ string ctipo = "P";
+ while (GvNominas.Columns.Count > 3)
+ {
+ GvNominas.Columns.RemoveAt(2);
+ }
+
+ int CurrentColumn = GvNominas.Columns.Count - 1;
+ foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
+ {
+ int CveConcepto = row["CveConcepto"].ToString().ToEntero();
+ string Concepto = row["Concepto"].ToString();
+ string Tipo = row["Tipo"].ToString();
+
+ if (Tipo != ctipo)
+ {
+ if (ctipo == "P")
+ {
+
+ BoundField field = new BoundField();
+ field.HeaderText = "Percepciones";
+ field.DataField = "SumaPercepciones";
+ field.DataFormatString = "{0:N2}";
+ field.ItemStyle.Width = Unit.Pixel(120);
+ field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
+ field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
+ GvNominas.Columns.Insert(CurrentColumn++, field);
+ if (Tipo != "D")
+ {
+ field = new BoundField();
+ field.HeaderText = "Deducciones";
+ field.DataField = "SumaDeducciones";
+ field.DataFormatString = "{0:N2}";
+ field.ItemStyle.Width = Unit.Pixel(120);
+ field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
+ field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
+ GvNominas.Columns.Insert(CurrentColumn++, field);
+ field = new BoundField();
+ field.HeaderText = "Total";
+ field.DataField = "Total";
+ field.DataFormatString = "{0:N2}";
+ field.ItemStyle.Width = Unit.Pixel(120);
+ field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
+ field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
+ GvNominas.Columns.Insert(CurrentColumn++, field);
+ }
+ }
+ else if (ctipo == "D")
+ {
+
+ BoundField field = new BoundField();
+ field.HeaderText = "Deducciones";
+ field.DataField = "SumaDeducciones";
+ field.DataFormatString = "{0:N2}";
+ field.ItemStyle.Width = Unit.Pixel(120);
+ field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
+ field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
+ GvNominas.Columns.Insert(CurrentColumn++, field);
+
+ field = new BoundField();
+ field.HeaderText = "Total";
+ field.DataField = "Total";
+ field.DataFormatString = "{0:N2}";
+ field.ItemStyle.Width = Unit.Pixel(120);
+ field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
+ field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
+ GvNominas.Columns.Insert(CurrentColumn++, field);
+ }
+ ctipo = Tipo;
+ }
+ if (dtempleados.SUM(string.Format("[{0}]", CveConcepto)) > 0)
+ {
+ BoundField field = new BoundField();
+ field.HeaderText = Concepto;
+ field.DataField = CveConcepto.ToString();
+ field.DataFormatString = "{0:N2}";
+ field.ItemStyle.Width = Unit.Pixel(80);
+ GvNominas.Columns.Insert(CurrentColumn++, field);
+ }
+ }
+
+ BoundField field2 = new BoundField();
+ field2.HeaderText = "Obligaciones";
+ field2.DataField = "SumaObligaciones";
+ field2.DataFormatString = "{0:N2}";
+ field2.ItemStyle.Width = Unit.Pixel(120);
+ field2.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
+ field2.ItemStyle.BackColor = System.Drawing.Color.LightGray;
+ GvNominas.Columns.Insert(CurrentColumn++, field2);
+
+
+ GvNominas.DataSource = dtempleados;
+ GvNominas.DataBind();
+ }
+ else
+ {
+
+ GvNominas.DataSource = null;
+ GvNominas.DataBind();
+ }
+
+ #endregion
+ UpDatos.Update();
+ }
+
+
+ protected void GvNominas_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ if (e.Row.RowType == DataControlRowType.DataRow)
+ {
+ Literal LtlNombre = e.Row.FCLiteral("LtlNombre");
+ LinkButton LnkTimbrar = (LinkButton)e.Row.FindControl("LnkTimbrar");
+ int cvePersonal = e.Row.DataKey("CvePersonal").ToEntero();
+ int CvePeriodo = e.Row.DataKey("CvePeriodo").ToEntero();
+ int CveNomina = e.Row.DataKey("CveNomina").ToEntero();
+ string SeTimbro = e.Row.DBCampo("SeTimbro").ToString();
+ string Nombre = e.Row.DBCampo("Nombre").ToString();
+ string Turno = e.Row.DBCampo("Turno").ToString();
+ string SubProyecto = e.Row.DBCampo("SubProyecto").ToString();
+ LnkTimbrar.Visible = false;
+ if (cvePersonal > 0)
+ {
+ LtlNombre.Text = String.Format("
{1} ", cvePersonal, Nombre);
+ if (CveNomina > 0)
+ {
+ if (SeTimbro == "False")
+ {
+ LnkTimbrar.Visible = true;
+ e.Row.CssClass = "info";
+
+ }
+ else
+ {
+ e.Row.CssClass = "success";
+ }
+
+ }
+ }
+ else
+ {
+ LtlNombre.Text = "Total General";
+ if (Turno.Length == 0 && SubProyecto.Length > 0)
+ {
+ LtlNombre.Text = String.Format("
Sub Proyecto: {0}", SubProyecto);
+ }
+ else if (Turno.Length > 0)
+ {
+ LtlNombre.Text = String.Format("Turno: {0}", SubProyecto);
+ }
+ else
+ {
+
+ e.Row.CssClass = "SubTotales";
+ }
+ e.Row.FindControl("LnkSobreRecibo").Visible = false;
+
+ }
+
+ }
+
+ }
+ #endregion
+ #region SobreRecibo
+
+ protected void LnkSobreRecibo_Click(object sender, EventArgs e)
+ {
+ }
+ #endregion
+
+
+
+ protected void LnkTimbrar_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void ImgDelete_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void LnkCancelar_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void LnkCargarNomina_Click(object sender, EventArgs e)
+ {
+
+ List Filesgral = TxtArchivoNomina.getfiles().Archivos;
+ bool continuar = Filesgral.Count > 0;
+ string stringError = "";
+ Archivo fileItem = continuar ? Filesgral[0] : null;
+ if (continuar)
+ {
+ string FileExtension = fileItem.Extencion.ToUpper();
+ if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV")
+ {
+ }
+ else
+ {
+ continuar = false;
+ stringError = "No se inserto un archivo de tipo Excel";
+ }
+
+ }
+ DataTable DTEXcel = new DataTable();
+ if (continuar)
+ {
+ try
+ {
+ using (System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + fileItem.FileUrl))
+ {
+ conn.Open();
+ string exceltableName = "Nomina";
+ DataTable tables = conn.GetSchema("Tables");
+ if (tables.FiltraParametros(string.Format("TABLE_NAME LIKE'%{0}%'", exceltableName)).Rows.Count == 0)
+ {
+ continuar = false;
+ stringError = "El documento no contiene la hoja nomina";
+
+ }
+ else
+ {
+
+ exceltableName = tables.FiltroPrimero(string.Format("TABLE_NAME LIKE'%{0}%'", exceltableName))["TABLE_NAME"].ToString();
+ }
+ if (continuar)
+ {
+ using (System.Data.Odbc.OdbcCommand cmd = conn.CreateCommand())
+ {
+
+ cmd.CommandType = CommandType.Text;
+ cmd.CommandText = $"SELECT * FROM [{exceltableName}] WHERE LEN(Codigo)>0 AND Codigo <> 'Codigo'";
+ using (System.Data.Odbc.OdbcDataAdapter da = new System.Data.Odbc.OdbcDataAdapter(cmd))
+ {
+ da.Fill(DTEXcel);
+
+ }
+ }
+ }
+ }
+
+ }
+ catch (Exception ex)
+ {
+
+ continuar = false;
+ stringError = "Ocurrio un Error al procesar el excel ";
+ string.Format(stringError, ex.ToString()).GuardaLog();
+ }
+ }
+ if (continuar && DTEXcel.Rows.Count == 0)
+ {
+
+ continuar = false;
+ stringError = "No se encontraron cambios";
+ }
+ StringBuilder str = new StringBuilder();
+ bool rollback = false;
+ if (continuar)
+ {
+
+ int CveMoneda = 1;
+ List lConceptos = new List();
+ foreach (DataColumn item in DTEXcel.Columns)
+ {
+ if (item.ColumnName.ToEntero() > 0)
+ {
+ lConceptos.Add(item.ColumnName.ToEntero());
+ }
+
+ }
+ using (ClsRH objpersonal = new ClsRH())
+ {
+ using (ClsNominas objNomina = new ClsNominas())
+ {
+ foreach (DataRow row in DTEXcel.Rows)
+ {
+ string Codigo = row["Codigo"].ToString();
+ int CvePersonal = 0;
+ int CveNomina = 0;
+ double SubTotal = 0;
+ double Total = 0;
+ int CveMetodoPago = 0;
+ if (Codigo != "-1" && objpersonal.GetPersonal(-1, Codigo, "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) &&
+ objpersonal.DtResultados.Rows.Count == 1)
+ {
+ CvePersonal = objpersonal.CvePersonal;
+ CveMetodoPago = objpersonal.CveMetodoPago;
+ }
+ else
+ {
+ str.AppendLine(string.Format("No se encontro el codigo {0} ", Codigo));
+ }
+ if (CvePersonal > 0)
+ {
+ if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
+ {
+ if (objNomina.DtResultados.Rows.Count > 0)
+ {
+ CveNomina = objNomina.CveNomina;
+ }
+ else
+ {
+ if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
+ "", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
+ {
+ CveNomina = objNomina.CveNomina;
+ }
+ else
+ {
+ rollback = true;
+ }
+ }
+ }
+ else
+ {
+ rollback = true;
+ }
+ }
+ if (CveNomina > 0)
+ {
+ foreach (int CveConcepto in lConceptos)
+ {
+ decimal Importe = 0;
+ decimal ImporteGravado = 0;
+ decimal ImporteExento = 0;
+ Importe = row[CveConcepto.ToString()].ToString().ToDecimal();
+ try
+ {
+ ImporteExento = row[string.Format("E{0}",CveConcepto)].ToString().ToDecimal();
+ }
+ catch (Exception) { }
+ ImporteGravado = Importe - ImporteExento;
+ objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento,UsuarioActual.CveUsuario);
+
+ }
+ }
+ }
+ }
+ }
+
+ }
+ if (!continuar)
+ {
+ Alert(stringError, ModExtensiones.TipoMensaje.MsgAdvertencia);
+ }
+ else
+ {
+ Alert("La información se a actualizado satisfactoriamente");
+ }
+ }
+
+ protected void LnkFormatoEmpleados_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void LnkFormato_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
+ var libro = wb.AddWorksheet("Nomina");
+ int column = 1;
+ libro.Row(1).Hide();
+
+ libro.Cell(1, column).Value = "Codigo";
+ libro.Cell(2, column).Value = "Codigo";
+ column++;
+ libro.Cell(1, column).Value = "Empleado";
+ libro.Cell(2, column).Value = "Empleado";
+ libro.Column(column).Width = 35;
+ foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
+ {
+ column++;
+ string CveConcepto = row["CveConcepto"].ToString();
+ string Concepto = row["Concepto"].ToString();
+ libro.Cell(1, column).Value = CveConcepto;
+ libro.Cell(2, column).Value = Concepto;
+ libro.Column(column).Width = 15;
+ column++;
+ CveConcepto = string.Format("E{0}", row["CveConcepto"]);
+ Concepto = string.Format("Exento {0}", row["Concepto"]);
+ libro.Cell(1, column).Value = CveConcepto;
+ libro.Cell(2, column).Value = Concepto;
+ libro.Column(column).Width = 15;
+
+ }
+ libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
+ libro.Row(2).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
+ libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
+ libro.Row(2).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
+ //libro.Row(1).Cell(13).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(247, 150, 70));
+ //libro.Row(1).Cell(14).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 240));
+ //libro.Row(1).Cell(15).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
+ int Fila = 2;
+ foreach (DataRow erow in dtempleados.FiltraParametros("CvePersonal>0").Rows)
+ {
+ Fila++;
+ column = 1;
+ libro.Cell(Fila, column).Value = erow["Codigo"];
+ column++;
+ libro.Cell(Fila, column).Value = erow["Nombre"];
+ foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
+ {
+ column++;
+ string Concepto = row["CveConcepto"].ToString();
+ libro.Cell(Fila, column).Value = erow[Concepto];
+ column++;
+ Concepto = string.Format("{0}-E", row["CveConcepto"]);
+ libro.Cell(Fila, column).Value = erow[Concepto];
+
+ }
+ }
+ //libro.Row(2).SetAutoFilter();
+ System.IO.Stream fs = new System.IO.MemoryStream();
+ wb.SaveAs(fs);
+ fs.Position = 0;
+ System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
+ using (System.IO.Stream input = fs)
+
+ {
+ input.CopyTo(memoryStream);
+ }
+ memoryStream.Position = 0;
+
+ Response.Clear();
+ Response.Buffer = true;
+
+ Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "FormatoCargaNominas"));
+ Response.BinaryWrite(memoryStream.ToArray());
+ Response.End();
+ }
+ catch (Exception ex)
+ {
+ Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString());
+ }
+ }
+}
\ No newline at end of file
diff --git a/RH/MiPerfil.aspx.vb b/RH/MiPerfil.aspx.vb
index c5faef33b..fcdcb91a7 100644
--- a/RH/MiPerfil.aspx.vb
+++ b/RH/MiPerfil.aspx.vb
@@ -379,7 +379,6 @@ Partial Class RH_MiPerfil
DTConsumos = Nothing
CargaEstados(1)
CargaSuperioresOrganigrama()
- CargaPermisos()
CargaPermisosReemplazos()
CargaConceptos()
CargaDatosPersonal()
@@ -388,6 +387,7 @@ Partial Class RH_MiPerfil
If clave > 0 Then
ViewState("CvePersonal") = clave
CargaDatos()
+ CargaPermisos()
LtlTitulo.Text = "Consulta de Personal:"
If UsuarioActual.CveRol = 1 Then
ImgImprimirExpediente.Visible = True
diff --git a/SigAyuda.aspx b/SigAyuda.aspx
new file mode 100644
index 000000000..0489be135
--- /dev/null
+++ b/SigAyuda.aspx
@@ -0,0 +1,687 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SigAyuda.aspx.vb" Inherits="Metronic_SigAyuda" %>
+
+
+
+
+
+
+
+
+
+ Ayuda
+
+
+
+
+
+
+
+
+
+ <%--
+
+
+
+ Ordenes de compra
+
+
+ Compras
+
+
+ Bancos
+
+
+ Contabilidad
+
+
+ Ventas
+
+
+ Recursos Humanos
+
+
+ Activos Fijos
+
+
+ Inventarios
+
+
+
+
+ --%>
+
+
+ <%--Titulo--%>
+
+ <%-- Ordenes de compra --%>
+
+ <%-- Compras --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Catalogo de proveedores
+
+
+
+
+
+
+
+
+
eFacturas y Proveedores
+
+
+
+
+
+
+
+
+
Manual Proveedores Pagos
+
+
+
+
+
+
+
+
+
Manual Registro de factura
+
+
+
+
+
+
+
+
+
Recepción de Complementos de Pago
+
+
+
+
+
+
+
+
+
+
+
+ <%-- Bancos --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Cancelacion de complementos de pago
+
+
+
+
+
+
+
+
+
Manual Cuentas Bancarias
+
+
+
+
+
+
+
+
+
Procedimiento de caja chica
+
+
+
+
+
+
+
+
+
Procedimiento para actualizar gestor de cobranza
+
+
+
+
+
+
+
+
+
Surtir mercancía de contado
+
+
+
+
+
+
+
+
+
Uso de cajas chicas y Cortes en Punto de Venta
+
+
+
+
+
+
+
+
+
+
+
+ <%-- Contabilidad --%>
+
+ <%-- Ventas --%>
+
+ <%-- Recursos Humanos --%>
+
+ <%-- Activos Fijos --%>
+
+ <%-- Inventarios --%>
+
+
+
+ <%--
+
--%>
+
+
+
+
+
+
+
+
diff --git a/SigAyuda.aspx.vb b/SigAyuda.aspx.vb
new file mode 100644
index 000000000..5172f53a7
--- /dev/null
+++ b/SigAyuda.aspx.vb
@@ -0,0 +1,32 @@
+
+Partial Class Metronic_SigAyuda
+ Inherits System.Web.UI.Page
+
+ Protected Sub btnDownload_Click(sender As Object, e As EventArgs)
+ Try
+ Dim docto As String = TxtDocto.Text.Replace("/", "\")
+
+ Dim path As String = $"{AppDomain.CurrentDomain.BaseDirectory}{docto}"
+
+
+ Dim file As New System.IO.FileInfo(path)
+ Dim mimeType As String = "text/plain"
+ Try
+ mimeType = MimeMapping.GetMimeMapping(path)
+ Catch ex As Exception
+ End Try
+ 'Response.Write(path)
+ Response.Clear()
+ Response.ClearHeaders()
+ Response.ClearContent()
+ Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}")
+ Response.AddHeader("Content-Length", file.Length.ToString())
+ Response.ContentType = mimeType
+ Response.Flush()
+ Response.TransmitFile(file.FullName)
+ Response.End()
+ Catch ex As Exception
+ 'GuardaLog($"GenerateFile: {ex.ToString()}")
+ End Try
+ End Sub
+End Class