From d21e641c8f4f212a94c7711ff9f5cc09c8a49266 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 26 Jul 2021 18:35:05 -0700 Subject: [PATCH 1/5] -- 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/5] 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 31415c80417627b361cce76b3ec6ca917cc104d9 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Jul 2021 18:55:27 -0700 Subject: [PATCH 3/5] 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 4/5] 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) { From cead7dcae128525d72f5c0d14fe832d38387b5d3 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 29 Jul 2021 10:04:54 -0700 Subject: [PATCH 5/5] Valida diferencia de IPES Compras --- Compras/Compras.aspx.vb | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index f65919d08..e10a8b627 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8595,6 +8595,50 @@ Partial Class Compras_Compras Respuesta = True End If + + + If Respuesta Then + + Dim IEPSPSDetalles As Decimal = TmpDT.SUM("IEPSPS", " IEPSPS > 0 ").ToDecimal + Dim DiferenciaIEPSPS As Decimal = TxtIEPS.Text.ToDecimal - IEPSPSDetalles + + Dim DTConsultaIEPSPS As New DataTable + DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'") + + + Dim IndiceContador As Integer = 0 + Dim IndicePrimero As Integer = 0 + + + For Each dRow As DataRow In TmpDT.Rows + If Boolean.Parse(dRow("AplicaIEPS").ToString) Then + IndicePrimero = IndiceContador + Exit For + End If + IndiceContador = IndiceContador + 1 + Next + + If DiferenciaIEPSPS <> 0 Then + + If DTConsultaIEPSPS.Rows.Count > 0 Then + 'Ajusta IPES en primer registro que aplique IEPS + TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS + TmpDT.AcceptChanges() + Else + Respuesta = False + Alert("Los productos especificados en el lisado no tienen asigando impuesto IEPS, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia) + End If + End If + + + End If + + + + + + + Return Respuesta End Function