From d21e641c8f4f212a94c7711ff9f5cc09c8a49266 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 26 Jul 2021 18:35:05 -0700 Subject: [PATCH 1/6] -- gridview con productos que coinciden --- Inventarios/RepAnomalias.aspx | 44 ++++++++++++++++++++++++++++++++ Inventarios/RepAnomalias.aspx.vb | 13 ++++++++++ 2 files changed, 57 insertions(+) diff --git a/Inventarios/RepAnomalias.aspx b/Inventarios/RepAnomalias.aspx index 1b930ed61..3b7ee3bef 100644 --- a/Inventarios/RepAnomalias.aspx +++ b/Inventarios/RepAnomalias.aspx @@ -304,6 +304,50 @@ +
+
+ +
+
+ Número de registros: +
+
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index ad367eea6..6935e4ef9 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -187,6 +187,11 @@ Partial Class Inventarios_RepAnomalias GvF.DataBind() BanderaSerieLoteCad(GvF, DtF) + Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0") + GvC.DataSource = DtC + GvC.DataBind() + BanderaSerieLoteCad(GvC, DtC) + Dim Script = "" If (GvF.Rows.Count > 0) Then GvF.UseAccessibleHeader = True @@ -204,6 +209,14 @@ Partial Class Inventarios_RepAnomalias LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString End If + If (GvC.Rows.Count > 0) Then + GvC.UseAccessibleHeader = True + GvC.HeaderRow.TableSection = TableRowSection.TableHeader + Script += "OrdenarGVS();" + divRegistradosCoinciden.Visible = True + LtlCoincidentes.Text = GvC.Rows.Count.ToString + End If + PSIguales() RegistraScript(Script) From c5011cd59406f90b9abd498c73717be370b0eea7 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 27 Jul 2021 21:51:43 -0700 Subject: [PATCH 2/6] caracter faltante --- Contabilidad/ContabilidadElectronica.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index 05310e147..0e154f034 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -121,7 +121,7 @@ Partial Class Contabilidad_ContabilidadElectronica Str.AppendFormat("Sello=""{0}"" ", "123") Str.AppendFormat("noCertificado=""{0}"" ", "123") Str.AppendFormat("Certificado=""{0}"" ", "1234567890") - Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas""") + Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas"">") 'DETALLES For Each Dr As DataRow In DtCuentas.Rows From 4dd17f1984d536ada32a90b161c36b743c7867ad Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Wed, 28 Jul 2021 12:47:20 -0700 Subject: [PATCH 3/6] --- App_Code/LogicNominas.vb | 12 ++++++------ Nomina/Nomina.aspx | 33 +++++++++++++++++++++++++++++---- Nomina/Nomina.aspx.cs | 30 +++++++++++++++++++++++++++++- vwd.webinfo | 8 ++++++++ 4 files changed, 72 insertions(+), 11 deletions(-) diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 8762937db..35304a37d 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -399,13 +399,13 @@ Public Class LogicNominas ObjOtrosPagos.Add(otrp) - If Row("SATCveConcepto").ToString().ToEntero() = 7 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio - ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "002", ' codigo fijo - .Clave = Row("Codigo").ToString(), .Concepto = "ISR", .Importe = Row("Importe").ToString().ToDecimal}) + If Row("SATCveConcepto").ToString().ToEntero() = 7 AndAlso Row("Importe").ToString().ToDecimal() > 0 Then 'Subsidio + 'ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "002", ' codigo fijo + ' .Clave = Row("Codigo").ToString(), .Concepto = "ISR", .Importe = Row("Importe").ToString().ToDecimal}) End If - If Row("SATCveConcepto").ToString().ToEntero() = 8 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio - ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "071", ' codigo fijo - .Clave = Row("Codigo").ToString(), .Concepto = "(Ajuste en Subsidio para el empleo (efectivamente entregado al trabajador)", .Importe = Row("Importe").ToString().ToDecimal}) + If Row("SATCveConcepto").ToString().ToEntero() = 8 AndAlso Row("Importe").ToString().ToDecimal() > 0 Then 'Subsidio + 'ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "071", ' codigo fijo + ' .Clave = Row("Codigo").ToString(), .Concepto = "(Ajuste en Subsidio para el empleo (efectivamente entregado al trabajador)", .Importe = Row("Importe").ToString().ToDecimal}) End If End If diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index f0db650f5..1f1a1c0d9 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -1359,9 +1359,9 @@
-
- Forma de pago
- +
+ Forma de pago
+ @@ -1374,11 +1374,36 @@
- + Días extras
+
+
+
+ + Ejercicio +
+
+
+
+
+ +
+ ¿Prima Vacacional? +
+ +
+
+
+ +
+ ¿Cobrar IMSS? +
+ +
+
Actualizar Guardar diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 5fb57800d..fc195f656 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -13,6 +13,7 @@ using iTextSharp.text.pdf; using System.IO; using System.Data.SqlClient; using System.Configuration; +using System.Collections.Specialized; public partial class Nomina_Nomina2 : ClsPaginas { @@ -1095,7 +1096,28 @@ public partial class Nomina_Nomina2 : ClsPaginas } UpDatos.Update(); } + private void CreaObjetoEmpresa(ref Usuario UsuarioActual) + { + ClsSisEmpresas ObjEmpresa = new ClsSisEmpresas(); + if (ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1")) + { + if (ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa)) + { + System.Data.DataTable dttmp = ObjEmpresa.DtResultados; + HybridDictionary EmpresasFuncionalidades = new HybridDictionary(); + foreach (System.Data.DataRow Row in dttmp.Rows) + EmpresasFuncionalidades.Add(Convert.ToInt32(Row["CveFuncionalidad"]), Row["Valor"].ToString()); + ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades); + } + + UsuarioActual.Empresa = ObjEmpresa.Empresa; + } + else + { + } + ObjEmpresa.Dispose(); + } protected void LnkTimbrar_Click(object sender, EventArgs e) { LinkButton lnk = (LinkButton)sender; @@ -1104,7 +1126,13 @@ public partial class Nomina_Nomina2 : ClsPaginas int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero(); int CveNomina = gvRow.DataKey("CveNomina").ToEntero(); LogicNominas lognom = new LogicNominas(); - + Usuario UsuarioActual = null; + using(ClsSisUsuarios ObjUsuario= new ClsSisUsuarios()) + { + UsuarioActual =ObjUsuario.ValidaUsuario("jcaudillo", Encripta("45makako45"), "-1", 1); + } + CreaObjetoEmpresa(ref UsuarioActual); + UsuarioActual.CveEmpresa = this.UsuarioActual.CveEmpresa; string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual); if (Msg != null && Msg.Length > 0) { Alert(Msg, TipoMensaje.MsgAdvertencia); } diff --git a/vwd.webinfo b/vwd.webinfo index 5384d515a..d3ade46a8 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -272,6 +272,14 @@ + + + + + + + + From 4c95979000990e7bec46058548854de546f438fa Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 28 Jul 2021 13:57:47 -0700 Subject: [PATCH 4/6] Validacion descuento via nomina --- Bancos/Devoluciones.aspx | 2 +- Bancos/Devoluciones.aspx.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bancos/Devoluciones.aspx b/Bancos/Devoluciones.aspx index 2e7b1a6a3..0948bde24 100644 --- a/Bancos/Devoluciones.aspx +++ b/Bancos/Devoluciones.aspx @@ -65,7 +65,7 @@
- +
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index a8e06bbe5..017243297 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -415,7 +415,7 @@ public partial class Bancos_Devoluciones : ClsPaginas string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text; string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text; - if (OpcionDevolucion.SelectedValue.ToEntero() == 3 || TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) + if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) { foreach (GridViewRow gvr in GvDevoluciones.Rows) { From 31415c80417627b361cce76b3ec6ca917cc104d9 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Jul 2021 18:55:27 -0700 Subject: [PATCH 5/6] parametro de ver por detalle/cantidad en if. ya cerrado --- App_Code/ClsInventarios.vb | 3 ++- Inventarios/RepAnomalias.aspx.vb | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 2c8d4284b..a4f596a68 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2863,12 +2863,13 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean + Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoResultadosGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@GPO", SqlDbType.Int).Value = GPO End With Try SqlAdapter.Fill(Data) diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index 6935e4ef9..29071ec0c 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -82,7 +82,7 @@ Partial Class Inventarios_RepAnomalias dt = Inventario.DtResultados End If Else - If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa) Then + If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero) Then dt = Inventario.DtResultados End If End If @@ -155,7 +155,7 @@ Partial Class Inventarios_RepAnomalias If Inventario.GetInventarioFisicoDetallesProveedores(CveInventarioFisico, UsuarioActual.CveEmpresa) Then Dim dta As DataTable = Inventario.DtResultados Dim str As New StringBuilder - If dta IsNot Nothing AndAlso dt.Rows.Count > 0 Then + If dta IsNot Nothing AndAlso dta.Rows.Count > 0 Then For Each dr As DataRow In dta.FiltraParametros("Incluye = 1").Rows str.AppendFormat("{0},", dr("RazonSocial")) @@ -273,9 +273,9 @@ Partial Class Inventarios_RepAnomalias 'End Sub Private Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click - ImprimirbytesPDF(Impimir, Formato:="PDF") + ImprimirbytesPDF(Imprimir, Formato:="PDF") End Sub - Protected Function Impimir() As Byte() + Protected Function Imprimir() As Byte() Dim retorno As Byte() = Nothing Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepAnomalias.rdlc", UsuarioActual.Empresa.Ruta)) From fc7dedc60eac4343bb73c43960b27af27298b626 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Jul 2021 20:31:11 -0700 Subject: [PATCH 6/6] parametro movto permanente --- App_Code/ClsNominas.vb | 11 +++--- Bancos/Devoluciones.aspx.cs | 67 +++++++++++++++++++++---------------- Nomina/Nomina.aspx.cs | 5 ++- 3 files changed, 46 insertions(+), 37 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 71020a7ac..3295fce89 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2603,8 +2603,8 @@ Public Class ClsNominas End Try Return retorno End Function - Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Boolean - Dim retorno As Boolean = False + Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Integer + Dim retorno As Integer = 0 DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -2618,15 +2618,16 @@ Public Class ClsNominas .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion) .Add("@estatus", SqlDbType.Bit).Value = (estatus) .Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta) + .Add("@CveMovtoPermanente", SqlDbType.Int).Direction = ParameterDirection.Output End With Try SqlAdapter.Fill(Data) - retorno = True + retorno = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero Catch sqEx As SqlException - retorno = False + retorno = -1 OnError("Ocurrió un error al agregar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception - retorno = False + retorno = -1 OnError("Ocurrió un error al agregar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 017243297..9a4c6db72 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -112,8 +112,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e) - { - string tipo = ""; + { switch (TipoDevolucion.SelectedValue) { case "1": @@ -160,7 +159,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } protected void CargaPersonal() { - DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa); + DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto"); DdlPersonal.DataBind(); DdlPersonal.Items.Insert(0, new ListItem("Seleccione", "-1")); } @@ -417,25 +416,7 @@ public partial class Bancos_Devoluciones : ClsPaginas if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) { - foreach (GridViewRow gvr in GvDevoluciones.Rows) - { - if (gvr.FCCheckBox("Chk").Checked) - { - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE)) - { - MsgError = "No se pudo insertar concepto de Devolución"; - break; - } - } - } - //GUARDA PREPOLIZAS DETALLE Bancos - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, TxtImporte.Text.ToDecimal(), Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: TxtImporte.Text.ToDecimal())) - { - MsgError = "No se pudo insertar concepto de Devolución"; - } - - if (MsgError.Equals("")) - { + int cveConcepto = DdlConcepto.SelectedValue.ToEntero(); string descripcion = TxtDescripcion.Text; @@ -448,11 +429,36 @@ public partial class Bancos_Devoluciones : ClsPaginas bool estatus = true; int CveCuenta = -1; - if (!ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta)) + if (ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) < 0) { MsgError = "No se pudo insertar movimiento permanente"; } + + + foreach (GridViewRow gvr in GvDevoluciones.Rows) + { + if (gvr.FCCheckBox("Chk").Checked) + { + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE)) + { + MsgError = "No se pudo insertar concepto de Devolución"; + break; + } + else + { + //Decimal tTotal = (TxtValor.Text.ToDecimal() * TxtVecesAplicar.Text.ToDecimal()).RoundSQL(); + Decimal tTotal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal(); + //GUARDA PREPOLIZAS DETALLE Via Nómina + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, tTotal, Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: tTotal)) + { + MsgError = "No se pudo insertar concepto de Devolución"; + } + } + } } + + + } else @@ -612,17 +618,20 @@ public partial class Bancos_Devoluciones : ClsPaginas Msg.AppendFormat(@"

Ver Póliza", IDPoliza); } ObjIE.Commit(); + + if (!Msg.ToString().Equals("")) + { + string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery); + Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery)); + } } else { ObjIE.RollBack(); + Msg.Clear(); + Alert(Msg.ToString(), TipoMensaje.MsgError); } - - if (!Msg.ToString().Equals("")) - { - string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery); - Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery)); - } + ObjIE.Dispose(); ObjMov.Dispose(); diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index fc195f656..cf9a412a2 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -1395,7 +1395,7 @@ public partial class Nomina_Nomina2 : ClsPaginas Archivo fileItem = continuar ? Filesgral[0] : null; if (continuar) { - string FileExtension = fileItem.Extencion.ToUpper(); + string FileExtension = fileItem.Extension.ToUpper(); if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV") { } @@ -4586,8 +4586,7 @@ public partial class Nomina_Nomina2 : ClsPaginas bool Continuar; using (ClsNominas ObjMovt = new ClsNominas()) { - Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta); - + Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) > 0; } if (Continuar) {