From 970ce252fb4b1ecc2b78456f31aa439993ff53f4 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 7 Apr 2021 15:42:20 -0700 Subject: [PATCH 1/4] mejoras. manejo de existencia con decimales --- Inventarios/AjustesSeccionAlmacen.aspx | 2 +- Inventarios/AjustesSeccionAlmacen.aspx.vb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Inventarios/AjustesSeccionAlmacen.aspx b/Inventarios/AjustesSeccionAlmacen.aspx index 054cd4912..de1c2cc0a 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx +++ b/Inventarios/AjustesSeccionAlmacen.aspx @@ -88,7 +88,7 @@ <%----%> - + diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 11eaa4b15..45bd0b5fa 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -212,11 +212,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen Next 'inserto la prepoliza - If CveMovimientoEntrada > 0 AndAlso CveMovimientoSalida > 0 Then + If Not ErrorMovInv AndAlso CveMovimientoEntrada > 0 AndAlso CveMovimientoSalida > 0 Then Dim Concepto As String = "Ajuste Sección" Dim IdCtaContableOrigen As Integer = 0 Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - Dim importe As Decimal = resultado.SUMD("Total").RoundAD + Dim importe As Decimal = resultado.SUMD("Total").RoundSQL Dim contabilizable As Boolean = False If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then ErrorMovInv = True From 5b6d9975e6e35c534da54cc6d68c8c15733d45c3 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 8 Apr 2021 11:50:56 -0700 Subject: [PATCH 2/4] --- Nomina/Nomina2.aspx | 7 +- Nomina/Nomina2.aspx.cs | 427 ++++++++++++++++++++++++++++++++++++++++- RH/Personal.aspx | 52 +++-- RH/Personal.aspx.vb | 8 +- Scripts/custom.js | 2 +- vwd.webinfo | 4 + 6 files changed, 471 insertions(+), 29 deletions(-) diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index 220284e94..cc836c276 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -145,7 +145,10 @@ Registrar provisión
  • - Ver provisón + Layout banco +
  • +
  • + Ver provisión
  • Timbrar todos @@ -187,6 +190,8 @@ + + diff --git a/Nomina/Nomina2.aspx.cs b/Nomina/Nomina2.aspx.cs index 432514595..204cd6a0e 100644 --- a/Nomina/Nomina2.aspx.cs +++ b/Nomina/Nomina2.aspx.cs @@ -11,6 +11,8 @@ using static Extensiones.ModExtensiones; using System.Drawing; using iTextSharp.text.pdf; using System.IO; +using System.Data.SqlClient; +using System.Configuration; public partial class Nomina_Nomina2 : ClsPaginas { @@ -370,14 +372,15 @@ public partial class Nomina_Nomina2 : ClsPaginas DataRow drow = objnom.DtResultados.Rows[0]; int Estatus = drow["Estatus"].ToString().ToEntero(); int CvePrePolizaProvision = drow["CvePrePolizaProvision"].ToString().ToEntero(); - LnkConceptoEmpleado.Visible = true; - LnkAutorizar.Visible = (Estatus == 1); - LnkRegistrarProvision.Visible = (Estatus > 2) && CvePrePolizaProvision<0; + LnkConceptoEmpleado.Visible = (Estatus == 1); + LnkAutorizar.Visible = true;// (Estatus == 1); + LnkRegistrarProvision.Visible = (Estatus > 2) && CvePrePolizaProvision < 0; LnkConceptoEmpleado.Visible = (Estatus < 2); LnkCargaAsistenciaMasiva.Visible = (Estatus < 2); LnkModalPlantillaNomina.Visible = (Estatus < 2); - LnkTimbrarTodos.Visible = (Estatus > 1); + LnkTimbrarTodos.Visible = (Estatus > 2); + LnkLayoutContable.Visible = (Estatus > 2); LnkProvisionNomina.Visible = CvePrePolizaProvision > 0; LnkProvisionNomina.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProvision}&Tipo=NOMPROV"; UpAccciones.Update(); @@ -396,7 +399,7 @@ public partial class Nomina_Nomina2 : ClsPaginas continuar = true; } - LnkTimbrarTodos.Visible = dtempleados.Rows.Count >0 && dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0")>0; + LnkTimbrarTodos.Visible = dtempleados.Rows.Count > 0 && dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0") > 0; } } @@ -2711,7 +2714,7 @@ public partial class Nomina_Nomina2 : ClsPaginas } paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2}, S.D.I.:{2:N2}, S.B.C.:{3:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"], drow2["SalarioDiarioIntegrado"], drow2["SalarioDiarioIMSS"])); cell.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Style = styilo; - paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2} ", drow2["DiasLaborados"], drow2["DiasRetardos"], drow2["DiasFaltados"])); cell.Blocks.Add(paragraphh); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2}, Centro de costos: {3}", drow2["DiasLaborados"], drow2["DiasRetardos"], drow2["DiasFaltados"], drow2["SubProyecto"])); cell.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Style = styilo; row = new GemBox.Document.Tables.TableRow(document); @@ -5266,11 +5269,421 @@ public partial class Nomina_Nomina2 : ClsPaginas using (ClsNominas objnom = new ClsNominas()) { - if (objnom.PrimaRiesgoUP(UsuarioActual.CveEmpresa,TxtFechaPRT.Text.ToDateTime(),TxtPrimaRiesgo.Text.ToDecimal())) + if (objnom.PrimaRiesgoUP(UsuarioActual.CveEmpresa, TxtFechaPRT.Text.ToDateTime(), TxtPrimaRiesgo.Text.ToDecimal())) { } } loadtablas(); } + private void CrearLayout(DataTable DTNomina) + { + StringBuilder sb = new StringBuilder(); + StringBuilder SbErrores = new StringBuilder(); + bool ErroresValidaciones = false; + + + SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout"); + + foreach (DataRow dRow in DTNomina.Rows) + { + string RFC = dRow["RFC"].ToString(); + string Nombre = dRow["Nombre"].ToString(); + string BancoNumCuenta = dRow["BancoNumCuenta"].ToString(); + decimal Importe = dRow["Importe"].ToString().ToDecimal(); + + + + if (RFC.Trim().Length == 0) + SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}
    "); + + System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/"); + if (!Coincidencia.Success) + { + SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido
    "); + ErroresValidaciones = true; + } + + if (BancoNumCuenta.Trim().Length != 10) + { + SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres
    "); // Bancomer 10 caracteres + ErroresValidaciones = true; + } + + + if (Importe <= 0) + { + SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0 + ErroresValidaciones = true; + } + } + + ErroresValidaciones = false; + + if (!ErroresValidaciones) + { + int Count = 1; + foreach (DataRow dRow in DTNomina.Rows) + { + StringBuilder SbLinea = new StringBuilder(); + + string RFC = dRow["RFC"].ToString(); + string Nombre = dRow["Nombre"].ToString(); + string BancoNumCuenta = dRow["BancoNumCuenta"].ToString(); + decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2); + + SbLinea.Append(Count.ToString("000000000")); + SbLinea.Append(RFC.Trim().PadRight(16)); + SbLinea.Append("03"); + SbLinea.Append(BancoNumCuenta.Trim().PadRight(20)); + SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", "")); + + + if (Nombre.Trim().Length > 40) + Nombre = Nombre.Substring(0, 40); + + SbLinea.Append(Nombre.Trim().PadRight(40)); + + SbLinea.Append("012"); + SbLinea.Append("000"); + + sb.AppendLine(SbLinea.ToString()); + + + Count = Count + 1; + } + + + Response.Clear(); + Response.ClearHeaders(); + Response.AppendHeader("Content-Length", sb.ToString()); + Response.ContentType = "text/plain"; + //Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\""); + Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\""); + Response.Write(sb.ToString()); + Response.End(); + } + else + Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia); + } + protected void LnkLayoutContable_Click(object sender, EventArgs e) + { + + using (ClsClaseBasez objbase = new ClsClaseBasez()) + { + if (objbase.runQuerystr($"PA_NomDispersiondenomina @CvePeriodo ={CvePeriodoSeleccionado}, @CveEmpresa ={UsuarioActual.CveEmpresa}")) + { + CrearLayout(objbase.DtResultados); + } + } + } +} + +class ClsClaseBasez : IDisposable +{ + protected SqlConnection SqlConexion; + protected SqlDataAdapter SqlAdapter; + protected DataTable datos; + protected DataSet DTSet; + public DataTable DtResultados + { + get + { + return datos; + } + } + public DataSet DTSetResultados + { + get + { + return DTSet; + } + } + protected bool disposedValue = false; + protected bool EsTransaccion = false; + public string MyCurrentError; + // REGISTRAR CONEXIÓN + private int CveConexion = 0; + + public ClsClaseBasez(ClsClaseBasez adsObj = null) + { + if (adsObj != null && adsObj.SqlAdapter != null && adsObj.SqlAdapter.SelectCommand != null && adsObj.SqlAdapter.SelectCommand.Transaction != null) + { + SqlConexion = adsObj.SqlConexion; + SqlAdapter = adsObj.SqlAdapter; + EsTransaccion = true; + } + else + { + SqlConexion = new SqlConnection(); + SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString; + try + { + SqlConexion.Open(); + SqlAdapter = new SqlDataAdapter("", SqlConexion); + ConexionAdd(); + } + catch (Exception ex) + { + this.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex); + } + } + } + + public void SqlDataAdapter(string StrSQL, CommandType TipoComando = CommandType.StoredProcedure) + { + if (SqlConexion.State == ConnectionState.Open) + { + SqlAdapter.SelectCommand.Parameters.Clear(); + SqlAdapter.SelectCommand.CommandText = StrSQL; + SqlAdapter.SelectCommand.CommandType = TipoComando; + datos = new DataTable(); + DTSet = new DataSet(); + } + } + protected void DataAdapter(string StrSQL, CommandType TipoComando = CommandType.Text) + { + + // if (SqlAdapter.SelectCommand == null) + // { + // if ((sqlCommand != null)) + // { + // SqlAdapter.SelectCommand = sqlCommand; + // } + // else + // { + // SqlAdapter.SelectCommand = new SqlCommand(); + // } + // SqlAdapter.SelectCommand.Connection = SqlConexion; + // } + + if (SqlConexion.State == ConnectionState.Open) + { + SqlAdapter.SelectCommand.Parameters.Clear(); + SqlAdapter.SelectCommand.CommandText = StrSQL; + SqlAdapter.SelectCommand.CommandType = TipoComando; + datos = new DataTable(); + DTSet = new DataSet(); + } + } + + private void ConexionAdd() + { + if (ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1") + { + try + { + SqlDataAdapter("PA_Sis_RegistrarConexion"); + { + var withBlock = SqlAdapter.SelectCommand.Parameters; + withBlock.Add("@Clase", SqlDbType.VarChar).Value = this.GetType().Name; + withBlock.Add("@Modulo", SqlDbType.VarChar).Value = string.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString(), HttpContext.Current.Request.QueryString.ToString()); + withBlock.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output; + } + SqlAdapter.Fill(datos); + CveConexion = SqlAdapter.SelectCommand.Parameters["@IDConexion"].Value.ToString().ToEntero(); + } + catch (Exception ex) + { + this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()); + } + } + } + + private void ConexionClose() + { + if (CveConexion > 0 && ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1") + { + SqlDataAdapter(string.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text); + + try + { + SqlAdapter.Fill(datos); + } + catch (Exception ex) + { + this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()); + } + CveConexion = 0; + } + } + protected void addParameters(string name, SqlDbType tipo, object valor) + { + if (SqlConexion.State == ConnectionState.Open) + SqlAdapter.SelectCommand.Parameters.Add(name, tipo).Value = valor; + } + + public bool runQuerystr(string Query, List Listaparametros = null, string msgError = "", bool mostrarError = true) + { + bool retorno = false; + try + { + if (SqlConexion.State == ConnectionState.Open) + { + SqlAdapter.SelectCommand.Parameters.Clear(); + SqlAdapter.SelectCommand.CommandText = Query; + SqlAdapter.SelectCommand.CommandType = CommandType.Text; + datos = new DataTable(); + if (Listaparametros != null) + { + foreach (parametroQuery pr in Listaparametros) + { + SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection; + } + } + + SqlAdapter.Fill(datos); + retorno = true; + } + else + { + string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada"; + InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}"; + ModExtensiones.GuardaLog(InfoAdicional); + } + } + catch (SqlException sqEx) + { + retorno = false; + setOnError(msgError, sqEx); + } + catch (Exception ex) + { + retorno = false; + setOnError(msgError, ex); + } + return retorno; + } + public int ExecQuery(string Query, List Listaparametros = null, string msgError = "", bool mostrarError = true) + { + int retorno = -1; + try + { + if (SqlConexion.State == ConnectionState.Open) + { + SqlAdapter.SelectCommand.Parameters.Clear(); + SqlAdapter.SelectCommand.CommandText = Query; + SqlAdapter.SelectCommand.CommandType = CommandType.Text; + if (Listaparametros != null) + { + foreach (parametroQuery pr in Listaparametros) + { + SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection; + } + } + + retorno = SqlAdapter.SelectCommand.ExecuteNonQuery(); + } + else + { + string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada"; + InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}"; + this.GuardaLog(InfoAdicional); + } + } + catch (SqlException sqEx) + { + retorno = -1; + setOnError(msgError, sqEx); + } + catch (Exception ex) + { + retorno = -1; + setOnError(msgError, ex); + } + return retorno; + } + + + protected bool RunQuery(string msgOnError) + { + bool retorno = false; + + try + { + SqlAdapter.Fill(datos); + retorno = true; + } + catch (Exception ex) + { + retorno = false; + + setOnError(msgOnError, ex); + } + return retorno; + } + protected bool RunQueryDS(string msgOnError) + { + bool retorno = false; + + try + { + SqlAdapter.Fill(DTSet); + retorno = true; + } + catch (Exception ex) + { + retorno = false; + + setOnError(msgOnError, ex); + } + return retorno; + } + public void setOnError(string Mensaje, Exception Exeption) + { + string InfoAdicional = ""; + if (SqlAdapter != null && SqlAdapter.SelectCommand != null && SqlAdapter.SelectCommand.Parameters != null) + InfoAdicional = SqlAdapter.SelectCommand.Parameters.ParametrosInfo(); + MyCurrentError = string.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString(), "\r\n", InfoAdicional); + this.OnError(Mensaje, Exeption, InfoAdicional); + } + public void IniciaTransacSQL() + { + SqlAdapter.SelectCommand.Transaction = SqlConexion.BeginTransaction(); + EsTransaccion = true; + } + + public void Commit() + { + SqlAdapter.SelectCommand.Transaction.Commit(); + SqlConexion.Close(); + } + + public void RollBack() + { + SqlAdapter.SelectCommand.Transaction.Rollback(); + SqlConexion.Close(); + } + public void Dispose() + { + ConexionClose(); + if ((SqlConexion != null)) + { + if (SqlConexion.State == ConnectionState.Open) + { + try + { + if ((SqlAdapter != null)) + SqlAdapter.Dispose(); + + SqlConexion.Close(); + } + catch (Exception ex) + { + this.OnError("Ocurrió un error al intentar cerrar la base de datos.", ex); + } + } + SqlConexion.Dispose(); + } + + if (datos != null) + datos.Dispose(); + if (SqlAdapter != null) + SqlAdapter.Dispose(); + + if (DTSet != null) + DTSet.Dispose(); + + GC.SuppressFinalize(this); + } } \ No newline at end of file diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 1c0531a67..87b4dd413 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -2240,30 +2240,30 @@ Por Paternidad, con Goce de Sueldo Viaje de Trabajo Incapacidad pagada por la empresa - Por horas, asunto personal sin Goce de Sueldo + Por horas, asunto personal sin Goce de Sueldo - - + +
    - + - + -
    +
    -
    +
    <%-- --%> -
    +
    @@ -2271,17 +2271,17 @@ <%-- --%> - -
    + +
    -
    - -
    +
    + +
    -
    +
    - +
    diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 0989f8ad6..4617e3a44 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -4455,15 +4455,17 @@ Partial Class RH_Personal End Sub Protected Sub BtnSolicitarVacaciones_Click(sender As Object, e As EventArgs) Handles BtnSolicitarVacaciones.Click - Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate - Dim fFin As Date = TxtFechaFinVac.Text.ToDate + Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate() + Dim fFin As Date = TxtFechaFinVac.Text.ToDate() + Dim fechapago As String = TxtFechaPago.Text.ToDate().ToString("yyyy/MM/dd") + Dim diasinhabil As Integer = Txtdiasinabiles.Text.ToEntero() 'Dim motivoVacaciones As String = TxtMotivoVacaciones.Text If fInicio <= fFin Then VacFolioActual = VacFolioActual + 1 Dim objRH As New ClsRH 'Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones) - Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual) + Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago:=fechapago, diasinabiles:=diasinhabil) If objRH.DtResultados.Rows.Count > 0 Then Dim ShowError As String = objRH.DtResultados.Rows(0)("ShowError").ToString() If ShowError.Length > 0 Then diff --git a/Scripts/custom.js b/Scripts/custom.js index 74eac68b9..28dd940bc 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1086,7 +1086,7 @@ function ADDropzone(txtid) { document.getElementById(txtid + '-paste').onpaste = function (event) { var __This = myDropzone; var objfiles = JSON.parse(TxtField.val()); - if (objfiles.length < maxFile) { + if ((maxFile != null) || (maxFile < 1) || objfiles.length < maxFile) { // use event.originalEvent.clipboard for newer chrome versions var items = (event.clipboardData || event.originalEvent.clipboardData).items; //console.log(JSON.stringify(items)); // will give you the mime types diff --git a/vwd.webinfo b/vwd.webinfo index 450c2d100..67035e8a8 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -212,6 +212,10 @@ + + + + From f7d6ed0090e094669f8dec913fb6b0d8fc5a2af1 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Apr 2021 12:06:54 -0700 Subject: [PATCH 3/4] - --- Compras/ReembolsosComprobaciones.aspx.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 9c1333df2..8dcb566a5 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -431,6 +431,10 @@ Partial Class Compras_ReembolsosComprobaciones Next + 'rmf. codigo temporal + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + ValFechaDocumento = False + End If If ValFechaDocumento Then Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia) From 23f8e38a335272fcc843d48358d4e9c72aaa7bdf Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 8 Apr 2021 17:59:30 -0700 Subject: [PATCH 4/4] ClientesAbonar icono complemento, Creditos --- Bancos/Creditos.aspx.vb | 2 +- Compras/eFacturas.aspx | 12 +++++++++++- Compras/eFacturas.aspx.vb | 24 +++++++++++++++++++++--- Ventas/ClientesAbonar.aspx | 2 +- Ventas/ClientesAbonar.aspx.vb | 5 ++--- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index 437d9c1de..708bd7064 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -983,7 +983,7 @@ Partial Class Bancos_Creditos For Each gvr As GridViewRow In GvTA.Rows If Not ObjCredito.UpdateCreditosDetalle(gvr.DataKey("CveCreditoDetalle").ToString.ToEntero, gvr.FCTextBox("TxtFecha").Text.ToString.ToDate, gvr.FCTextBox("TxtCapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtSeguro").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVACapital").Text.ToString.ToDouble, - gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, 1) Then + gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, -1) Then ErrorCredito = True Exit For End If diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index cde36d83a..9b2594e88 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -216,10 +216,20 @@ - + <%-- + + + + +
    --%> + <%----%> + + +
    + diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index b59eeb44c..0c39802b5 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -719,9 +719,15 @@ Partial Class Compras_eFacturas If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True - If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True - If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False - If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True + 'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True + 'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False + 'If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True + + If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(12).Visible = True : GvD.Columns(13).Visible = True + If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(11).Visible = False + If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(6).Visible = True + + CargaGvBitacora() CargaDatos() End If @@ -913,6 +919,11 @@ Partial Class Compras_eFacturas #Region "G V D A T O S" Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound + + If e.Row.RowType = DataControlRowType.Header Then + e.Row.Cells(4).Attributes.Add("data-tipodato", "numeric") + End If + If e.Row.RowType = DataControlRowType.DataRow Then e.Row.FindControl("lnkRegenerarPDF").Visible = True ' (UsuarioActual.CveRol = 1) 'e.Row.FindControl("lnkDownPdf").Visible = (UsuarioActual.CveRol = 1) @@ -937,6 +948,13 @@ Partial Class Compras_eFacturas e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString) + + 'e.Row.Cells(4).Attributes.Add("data-order", Convert.ToInt64(e.Row.DBCampo("Total").ToDecimal).ToString.PadLeft(10, "0"c)) + + + + + If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then e.Row.FCLiteral("LtlXML").Text = String.Format("Ver", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML"))) If e.Row.DBCampo("TipoComprobante") = "P" Then diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 0c2dc1e61..61dbde5f6 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -365,7 +365,7 @@ Complemento Pago - + diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 359ed6e11..c7b6ba849 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -639,11 +639,10 @@ Partial Class Ventas_ClientesAbonar If e.Row.DBCampo("CveVenta").ToEntero > 0 Then If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then - e.Row.FCLinkButton("LnkComplemento").Text = "" - e.Row.FCLinkButton("LnkComplemento").CssClass = "text-danger" + e.Row.FCLiteral("LtlComplemento").Text = "" End If Else - e.Row.FCLinkButton("LnkComplemento").Visible = False + e.Row.FCLiteral("LtlComplemento").Visible = False End If