From fbd7609b12d73d47a18d3b95cf7ee4ca4334d257 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 15 May 2023 17:38:58 -0700 Subject: [PATCH 01/28] =?UTF-8?q?--=20si=20carga=20el=20personal,=20solo?= =?UTF-8?q?=20cargue=20los=20dem=C3=A1s=20combos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RH/Personal.aspx.vb | 65 ++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 02efbc40f..42fbad8fa 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -914,35 +914,37 @@ Partial Class RH_Personal ViewState("CvePersonal") = Request("CvePersonal") DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing) 'CvePersonal = ViewState("CvePersonal").ToString().ToEntero() - CargaDatos() - CargaDocumentacionFirmaDecontratos() - CargaPersonalIncapacidad() - CargaMovtoPermanente() - 'LnkAddLicencias.Visible = True - 'TabLicencias.Visible = True - 'Configuración de Modalidad Update - BtnGuardar.Text = "Guardar Cambios" - LtlTitulo.Text = "Consulta de Personal:" - If UsuarioActual.CveRol = 1 Then - 'ImgImprimir.Visible = True - ImgImprimirExpediente.Visible = True + If CargaDatos() Then + CargaDocumentacionFirmaDecontratos() + CargaPersonalIncapacidad() + CargaMovtoPermanente() + 'LnkAddLicencias.Visible = True + 'TabLicencias.Visible = True + 'Configuración de Modalidad Update + BtnGuardar.Text = "Guardar Cambios" + LtlTitulo.Text = "Consulta de Personal:" + If UsuarioActual.CveRol = 1 Then + 'ImgImprimir.Visible = True + ImgImprimirExpediente.Visible = True + End If + + 'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ") + If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero() - 1 + + 'Inicia Permisos + If UsuarioActual.TienePermisoProceso(228) Then + GVAsistencia.Columns(10).Visible = True + End If + 'Fin Permisos + HlEvento.Visible = True + HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;" + + CargaViaticosPersonal() + + divBitacora.Visible = True + CargaGvBitacora() End If - 'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ") - If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero() - 1 - - 'Inicia Permisos - If UsuarioActual.TienePermisoProceso(228) Then - GVAsistencia.Columns(10).Visible = True - End If - 'Fin Permisos - HlEvento.Visible = True - HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;" - - CargaViaticosPersonal() - - divBitacora.Visible = True - CargaGvBitacora() Else cargatipoTrabajador() MostrarOcultarFechasEstatus() @@ -956,11 +958,11 @@ Partial Class RH_Personal BtnEliminar.Visible = False CarcaConceptosNomina() CargaFonacot() + CargaCuentasBancarias() 'Inicia Permisos 'Fin Permisos End If - CargaCuentasBancarias() If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then @@ -1613,11 +1615,13 @@ Partial Class RH_Personal End If ObjInventario.Dispose() End Sub - Private Sub CargaDatos() + Private Function CargaDatos() As Boolean + Dim Retorno As Boolean = False Dim ObjPersonal As New ClsRH() If ObjPersonal.GetPersonal(CvePersonal, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then If ObjPersonal.DtResultados.Rows.Count > 0 Then Dim drow As DataRow = ObjPersonal.DtResultados.Rows(0) + Retorno = True ChkEstemporal.Checked = drow("esTemporal").ToString() = "1" CHKRFCValidado.Checked = drow("RFCValidado").ToString() = "1" 'ChkPensionado.Checked = drow("Pensionado").ToString().ToUpper().Contiene("1", "TRUE") @@ -1909,7 +1913,8 @@ Partial Class RH_Personal End If End If ObjPersonal.Dispose() - End Sub + Return Retorno + End Function Private Sub CargaCuentasConceptos() Dim ObjConta As New ClsContabilidad From 703171082a13579839b1f11279cfc53ba8dc4e3b Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 15 May 2023 17:39:36 -0700 Subject: [PATCH 02/28] -- mejora en manejo de objimpuesto exento --- Ventas/Ventas.aspx.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9e04e1153..b4e95b29a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -12590,19 +12590,20 @@ Partial Class Ventas ' If drr("ImporteIVA").ToString().ToDouble > 0 Then 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero - If Timbre.Comprobante.Total > 0 AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0) Then + ' si es objimp = 01, significa que no lleva desglose de impuesto, está exento + If concepto.ObjetoImpuesto <> "01" AndAlso Timbre.Comprobante.Total > 0 AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0) Then concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(6), .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal}) End If - If drr("ImporteIEPS").ToString().ToDouble > 0 Then + If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteIEPS").ToString().ToDouble > 0 Then concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal}) End If - If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones + If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal}) End If - If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR + If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal}) End If From 5d21b6ebca92bd51501d4c4d5f834e9707ddcd28 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 15 May 2023 18:29:56 -0700 Subject: [PATCH 03/28] =?UTF-8?q?--=20actualizaci=C3=B3n=20masiva=20median?= =?UTF-8?q?te=20layout=20de=20ps=20adicionales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/CatPS.aspx | 47 ++++++++++++- Ventas/CatPS.aspx.vb | 158 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 202 insertions(+), 3 deletions(-) diff --git a/Ventas/CatPS.aspx b/Ventas/CatPS.aspx index ff53aa055..8477021f0 100644 --- a/Ventas/CatPS.aspx +++ b/Ventas/CatPS.aspx @@ -115,7 +115,9 @@
  • Excel Personalizado
  • - +
  • + Cargar Productos Adicionales +
  • <%--onclick="AbrirVentana('/Ventas/ProductosServicios.aspx', 700, 400, 'N', 'PS')"--%> @@ -373,7 +375,48 @@ - + diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb index 65e31729e..eb24c6069 100644 --- a/Ventas/CatPS.aspx.vb +++ b/Ventas/CatPS.aspx.vb @@ -46,6 +46,9 @@ Partial Class CatPS If UsuarioActual.CveEmpresa = 119 Then DdlEstado.SelectedValue = "-1" End If + If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso Not UsuarioActual.TienePermisoProceso(122) Then + LnkExcelPSAdicional.Visible = True + End If End If End Sub @@ -65,7 +68,6 @@ Partial Class CatPS If TxtCodigoBarras.Text.Trim = "" Then CodigoBarras = "-1" Else CodigoBarras = TxtCodigoBarras.Text.Trim If TxtNombre.Text.Trim = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper.Trim - Dim ObjPS As New ClsProductosServicios If ObjPS.GetPSLite(Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, Codigo, CodigoBarras, Nombre, DdlAplicaVenta.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero, DdlCveTipoPS.SelectedValue.ToEntero, DdlTipoClasificacion.SelectedValue.ToEntero) Then DtDatos = ObjPS.DtResultados @@ -285,4 +287,158 @@ Partial Class CatPS End Sub #End Region + +#Region "P R O D U C T O S A D I C I O N A L E S" + + Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, CodigoPS As String, PSAdicional As String, Cantidad As Decimal, Opcion As Integer) As Boolean + If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then + + Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563) & "," & UsuarioActual.CveEmpresa ' agregamos la empresa actual + Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x)) + For Each Franquicia As Integer In EmpresasFranquicia + Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", CodigoPS)).ToEntero + Dim CvePSAdicional As Integer + + If Opcion = 1 Then CvePSAdicional = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", PSAdicional)).ToEntero + + If CvePSPagina <= 0 Then + Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia) + Return False + End If + + If CvePSAdicional <= 0 AndAlso Opcion = 1 Then + Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia) + Return False + End If + + If Opcion = 1 Then + If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, Cantidad) Then + Return False + End If + End If + If Opcion = 2 Then + If Not ObjPS.RemovePSAdicionales(CvePSPagina, -1) Then + Return False + End If + End If + Next + End If + Return True + End Function + + Private Sub LnkExcelPSAdicional_Click(sender As Object, e As EventArgs) Handles LnkExcelPSAdicional.Click + RegistraScript(String.Format("$('#{0}').modal();", "DivCargaExcelPSAdicionales")) + + End Sub + + Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargarPSAdicional.Click + + GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) + Dim workbook As New GemBox.Spreadsheet.ExcelFile() + Dim worksheet = workbook.Worksheets.Add("Productos") + Dim DtExcel As New DataTable + DtExcel.Columns.Add("CodigoProducto", GetType(String)) + DtExcel.Columns.Add("CodigoProductoAdicional", GetType(String)) + DtExcel.Columns.Add("CantidadFija", GetType(String)) + + worksheet.InsertDataTable(DtExcel, New GemBox.Spreadsheet.InsertDataTableOptions() With + { + .ColumnHeaders = True, + .StartRow = 0, + .StartColumn = 0 + }) + + Dim columnCount = worksheet.CalculateMaxUsedColumns() + For i = 0 To columnCount + worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1)) + Next + workbook.Save(Response, $"CargaProductos.xlsx", GemBox.Spreadsheet.SaveOptions.XlsxDefault) + + End Sub + + Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcelPSAdicional.Click + If TxtExcel.getfiles().Archivos.Count > 0 Then + Dim file As Archivo = TxtExcel.getfiles().Archivos(0) + + Dim Directorio As String = Server.MapPath("~") & file.path + + Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV") + CargaArchivoPSAdicional(Directorio, file.filename, Tipo) + Else + Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError) + End If + End Sub + + Private Sub CargaArchivoPSAdicional(Ruta As String, FileName As String, Tipo As String) + Dim dt As New DataTable + Dim ErrorArchivo = False + Dim ErrorExcel As Boolean = False + + dt = ReadExcelFile(Ruta + FileName, True, 0).FiltraParametros("CodigoProducto <> ''") + + If Not ErrorArchivo Then + If Not dt.Columns(0).ColumnName.ToUpper = "CODIGOPRODUCTO" Then + Alert("El nombre de la primera columna debe ser 'ConceptoAdministrativo'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not dt.Columns(1).ColumnName.ToUpper = "CODIGOPRODUCTOADICIONAL" Then + Alert("El nombre de la segunda columna debe ser 'Cuenta'.Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + End If + + If Not ErrorArchivo Then + + Try + Dim ContadorRegistros As Integer = 0 + Dim ObjPS As New ClsProductosServicios + ObjPS.IniciaTransacSQL() + + 'antes de iniciar la carga se limpiarán los asignados, se filtran por codigops + For Each Row As DataRow In dt.FiltraParametros("", DistinctColumns:={"CodigoProducto"}).Rows + If Not GuardarProductosEquivalenteEnFranquicia(ObjPS, Row("CodigoProducto").ToString.Trim, "", 0, 2) Then + ErrorExcel = True + Exit For + End If + Next + If Not ErrorExcel Then + For Each Row As DataRow In dt.Rows + Dim CodigoPS As String = Row("CodigoProducto").ToString + Dim CodigoPSAdicional As String = Row("CodigoProductoAdicional").ToString + Dim Cantidad As Integer = Row("CantidadFija").ToString.ToEntero + If Not GuardarProductosEquivalenteEnFranquicia(ObjPS, CodigoPS, CodigoPSAdicional, Cantidad, 1) Then + ErrorExcel = True + Exit For + End If + ContadorRegistros = ContadorRegistros + 1 + Next + End If + If Not ErrorExcel Then + ObjPS.Commit() + Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563) & "," & UsuarioActual.CveEmpresa ' agregamos la empresa actual + Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x)) + 'regenerar el global de cada empresa + For Each Franquicia As Integer In EmpresasFranquicia + GlobalDTPSAdicionales(-1, Franquicia) = Nothing + Next + + Alert($"{ContadorRegistros} Registros aplicados.") + Else + ObjPS.RollBack() + Alert($"Ocurrió un error al cargar los productos.", TipoMensaje.MsgAdvertencia) + End If + + + Catch ex As Exception + Alert("No se pudo cargar el excel", TipoMensaje.MsgAdvertencia) + GuardaLog(ex.Message) + End Try + + End If + End Sub + + + +#End Region + End Class From 310ddb05b69d497696869936d3edb54169b54e6a Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 16 May 2023 09:44:00 -0700 Subject: [PATCH 04/28] -- acomodo visual --- Inventarios/TraspasoAlmacen.aspx | 20 ++++++++++---------- Inventarios/TraspasoAlmacen.aspx.vb | 8 +++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx index 4943e8b9c..bc914e937 100644 --- a/Inventarios/TraspasoAlmacen.aspx +++ b/Inventarios/TraspasoAlmacen.aspx @@ -666,38 +666,38 @@ - + - + - + - - + + - + - + - + - + - + diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 7a49dd6f9..901a16153 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1553,7 +1553,7 @@ Partial Class Inventarios_TraspasoAlmacen e.Row.FCTextBox("TxtCantidad").Visible = False e.Row.FCTextBox("TxtSerie").Visible = False - e.Row.Cells(2).Text = String.Format("Folio: {0} ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida")) + e.Row.Cells(2).Text = String.Format("Folio: {0} ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida")) e.Row.Cells(3).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString) e.Row.Cells(5).Text = String.Format("Almacen Origen: {0}     Almacen Destino: {1}       Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio")) @@ -1567,17 +1567,15 @@ Partial Class Inventarios_TraspasoAlmacen If e.Row.DBCampo("AplicaLote").ToString.Trim = "1" Then e.Row.FCTextBox("TxtLote").Visible = True + e.Row.FCTextBox("TxtLote").ReadOnly = True End If If e.Row.DBCampo("AplicaCaducidad").ToString.Trim = "1" Then e.Row.FCTextBox("TxtCaducidad").Visible = True + e.Row.FCTextBox("TxtCaducidad").ReadOnly = True End If - e.Row.FCTextBox("TxtSerie").ReadOnly = True - 'e.Row.FCTextBox("TxtSerie").Enabled = False - - End If 'FUNCIONALIDAD PISTOLA DE CODIGOS From 5ba613a5d64299afc14c4fe1ed227182b5982b15 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 16 May 2023 09:53:22 -0700 Subject: [PATCH 05/28] -- mejora visual --- Inventarios/TraspasoAlmacen.aspx | 6 +----- Inventarios/TraspasoAlmacen.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx index bc914e937..9c2e5c7a6 100644 --- a/Inventarios/TraspasoAlmacen.aspx +++ b/Inventarios/TraspasoAlmacen.aspx @@ -553,11 +553,8 @@ -
    -
    - @@ -633,8 +630,7 @@
    -
    - +
    diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 901a16153..6e24b8f56 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1555,7 +1555,7 @@ Partial Class Inventarios_TraspasoAlmacen e.Row.Cells(2).Text = String.Format("Folio: {0} ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida")) e.Row.Cells(3).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString) - e.Row.Cells(5).Text = String.Format("Almacen Origen: {0}     Almacen Destino: {1}       Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio")) + e.Row.Cells(5).Text = String.Format("Almacen Origen: {0}     Almacen Destino: {1}      
    Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio")) Else e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad"))) From 86c5ae592e621ada0558d3dfb0ff0ff8546d0f3d Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 17 May 2023 10:24:10 -0700 Subject: [PATCH 06/28] =?UTF-8?q?-=20filtro=20de=20contrato,=20no=20se=20e?= =?UTF-8?q?staba=20aplicando=20-=20tama=C3=B1o=20ddl=20contrato=20al=20100?= =?UTF-8?q?%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CxC/RepCxCDetalle.aspx | 2 +- CxC/RepCxCDetalle.aspx.vb | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index 461834c4f..156ab3415 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -348,7 +348,7 @@ Contrato:
    - +
    diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index c598ec10f..ae3fe6366 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -474,7 +474,8 @@ Partial Class RepCxCDetalle RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, - CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero()) Then + CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(), + CveContrato:=DdlContrato.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjMovtos.DSResultados.Tables(0) @@ -483,16 +484,10 @@ Partial Class RepCxCDetalle DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(0).Copy) If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - GvCartera.DataSource = ObjMovtos.DSResultados.Tables(1) - - 'DTCartera = ObjMovtos.DSResultados.Tables(1) - 'DTCartera.TableName = "DTCartera" DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(1).Copy) - End If - Else GvDatos.DataSource = Nothing End If From 1f10b25a33e479615dff93423a6cbd44288058ba Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 17 May 2023 10:58:24 -0700 Subject: [PATCH 07/28] -- mejora texto --- Inventarios/CatUnidades.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventarios/CatUnidades.aspx b/Inventarios/CatUnidades.aspx index 73f3e234f..6da00699e 100644 --- a/Inventarios/CatUnidades.aspx +++ b/Inventarios/CatUnidades.aspx @@ -166,7 +166,7 @@
    - +
    @@ -205,7 +205,7 @@
    - +
    From 3715693e6f4021f15b57378cff30d9d8fd6a8f12 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 18 May 2023 11:19:17 -0700 Subject: [PATCH 08/28] --- RH/CalculoSBC.aspx | 3 ++- RH/CalculoSBC.aspx.cs | 12 ++++++++++++ RH/Personal.aspx.vb | 33 ++++++++++++++------------------- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/RH/CalculoSBC.aspx b/RH/CalculoSBC.aspx index af9b49c14..fca73faf9 100644 --- a/RH/CalculoSBC.aspx +++ b/RH/CalculoSBC.aspx @@ -455,7 +455,8 @@ - + diff --git a/RH/CalculoSBC.aspx.cs b/RH/CalculoSBC.aspx.cs index edd3a2586..7fbdf7cf9 100644 --- a/RH/CalculoSBC.aspx.cs +++ b/RH/CalculoSBC.aspx.cs @@ -920,6 +920,18 @@ public partial class RH_CalculoSBC : ClsPaginas RegistraScript("$('#ModalDoctos').modal();"); } + + protected void GVDetalleParteVariable_RowDataBound(object sender, GridViewRowEventArgs e) + { + if(e.Row.RowType == DataControlRowType.DataRow) + { + for (int i = 0; i < e.Row.Cells.Count; i++) + { + e.Row.Cells[i].Text = Server.HtmlDecode(e.Row.Cells[i].Text); + } + } + + } } public class archivosD { diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 02efbc40f..f41f7417a 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -7486,25 +7486,20 @@ Partial Class RH_Personal End If End If - If continuar Then - - Using onom As ClsNominas = New ClsNominas() - onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, fecha.ToString("yyyy/MM/dd")) - - If onom.DtResultados.Rows.Count > 0 Then - - continuar = False - Dim strbuild As StringBuilder = New StringBuilder() - strbuild.Append("No es posible desactivar con esta fecha ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.") - - For Each drow As DataRow In onom.DtResultados.Rows - strbuild.AppendFormat("
    {0}", drow("PeriodoTexto")) - Next - Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia) - End If - - End Using - End If + 'If continuar Then + ' Using onom As ClsNominas = New ClsNominas() + ' onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, fecha.ToString("yyyy/MM/dd")) + ' If onom.DtResultados.Rows.Count > 0 Then + ' continuar = False + ' Dim strbuild As StringBuilder = New StringBuilder() + ' strbuild.Append("No es posible desactivar con esta fecha ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.") + ' For Each drow As DataRow In onom.DtResultados.Rows + ' strbuild.AppendFormat("
    {0}", drow("PeriodoTexto")) + ' Next + ' Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia) + ' End If + ' End Using + 'End If If continuar Then Using objrh As New ClsRH continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(), Txobservacionesbaja.Text) From 498be4d8d36ca459c2627a2dfb46517109749c81 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 May 2023 11:53:39 -0700 Subject: [PATCH 09/28] =?UTF-8?q?--=20cambio=20de=20cr=C3=A9dtos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx | 11 +---------- Bancos/IE.aspx.vb | 36 ++++-------------------------------- 2 files changed, 5 insertions(+), 42 deletions(-) diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index f7095185e..1b78035dc 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -141,7 +141,7 @@
    - +
    @@ -233,15 +233,6 @@
    -
    -
    -
    Interes:
    -
    - $ - -
    -
    -
    diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index a37c92bf4..72d33c057 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -726,12 +726,8 @@ Partial Class Bancos_IE CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero LtlTitulo.Text = "Pago de Créditos" CveIE = -1 - - DVInteresMoratorio.Visible = True - If Banc.GetCreditos(CveCredito, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then Dt = Banc.DtResultados - End If Banc.Dispose() @@ -1746,6 +1742,7 @@ Partial Class Bancos_IE dt = Cred.DtResultados.FiltraParametros("Estatus IN (1,101,102)") Dim Importe As Decimal = 0 + Dim ImporteInteres As Decimal = 0 If CveCreditoDetalle > 0 Then Dim drt As DataRow = Cred.DtResultados.FiltroPrimero(String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle)) If drt IsNot Nothing Then @@ -1754,18 +1751,15 @@ Partial Class Bancos_IE Alert("La Mensualidad no está vigente para pago", TipoMensaje.MsgError) End If Importe = dt.FiltroPrimeroValor("Mensualidad", String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle)).ToDecimal + ImporteInteres = dt.FiltroPrimeroValor("Intereses", String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle)).ToDecimal End If - - End If - TxtImporte.Text = Importe.ToString HdnImporteCredito.Value = Importe.ToString RegistraScript(String.Format("$get('TxtImporte').value = '{0}';", Importe.FormatoNumero)) TxtImporte.Attributes.Remove("onkeyup") TxtImporte.Attributes.Add("onkeyup", String.Format("ValidaCantidad({0},{1});", TxtImporte.ClientID, Importe)) - End If End If @@ -2908,15 +2902,6 @@ Partial Class Bancos_IE importeMX = importeMovimiento End If - Case 46 - - If TxtInteresMoratorio.Text.ToDecimal > 0 Then - importeMovimiento = TxtInteresMoratorio.Text.ToDecimal - importeMX = importeMovimiento - Else - importeMovimiento = 0 - importeMX = 0 - End If Case 50 @@ -3589,7 +3574,6 @@ Partial Class Bancos_IE End If - '''''''''''''''''''''''''''''''''''''''''''''' Case "EGSCREDITO" @@ -3606,7 +3590,8 @@ Partial Class Bancos_IE CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, PagueseA, "", ObjIE.Folio) - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, 57, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then + Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CveMoneda, False, 1) + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, ConPreP.CveConcepto, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then MsgError = "Ocurrió un error al registrar el asiento del ingreso." End If @@ -3623,19 +3608,6 @@ Partial Class Bancos_IE End If End If - - ' Case 46 - ' If TxtInteresMoratorio.Text.ToDecimal > 0 Then - ' importeMovimiento = TxtInteresMoratorio.Text.ToDecimal - ' importeMX = importeMovimiento - ' Else - ' importeMovimiento = 0 - ' importeMX = 0 - ' End If - - - - Case Else Dim TipoMovimiento As Boolean = True From 3345e1066c9427905f6a252223fe8c13c04d7beb Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Thu, 18 May 2023 11:54:26 -0700 Subject: [PATCH 10/28] Compras pago creditos --- App_Code/ClsFinanzas.vb | 26 + App_Code/ClsPaginas.vb | 2 + Compras/Compras.aspx | 195 ++-- Compras/Compras.aspx.vb | 122 ++- Compras/eFacturas.aspx.vb | 4 +- Contabilidad2/CatCuentasAsignaciones.aspx.vb | 2 +- Empresas/119/Formatos/ReciboDePago.rdlc | 169 +--- Empresas/158/Formatos/Factura.rdlc | 48 +- Finanzas/RepEstadoFlujoEfectivo.aspx | 951 +++++++++++++++++++ Finanzas/RepEstadoFlujoEfectivo.aspx.vb | 640 +++++++++++++ 10 files changed, 1859 insertions(+), 300 deletions(-) create mode 100644 Finanzas/RepEstadoFlujoEfectivo.aspx create mode 100644 Finanzas/RepEstadoFlujoEfectivo.aspx.vb diff --git a/App_Code/ClsFinanzas.vb b/App_Code/ClsFinanzas.vb index 2d99601cd..362342b40 100644 --- a/App_Code/ClsFinanzas.vb +++ b/App_Code/ClsFinanzas.vb @@ -313,6 +313,32 @@ Public Class ClsFinanzas End Function + Public Function GetRazonesFinancierasEstadoFlujoEfectivoRep(CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer, Fechas As String, Opcion As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Finan_RF_EstadoFlujoEfectivoRepGet") + + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@Periodo", SqlDbType.Int).Value = Periodo + .Add("@Fechas", SqlDbType.VarChar).Value = Fechas + .Add("@Opcion", SqlDbType.Int).Value = Opcion + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar el Reporte de Estado de Flujo de Efectivo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function GetRazonesFinancierasRatiosRep(CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer, Fechas As String, Opcion As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Finan_RF_RatiosRepGet") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 3966630af..d578a11e3 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7829,6 +7829,7 @@ Public Class ClsPaginas Concepto = String.Format("{0} NC:{1}", CompraActual.ProveedorNombre, Pago.Referencia) If Pago.TipoPago = "Egsc" AndAlso Not ErrorMovtos Then ' A N T I C I P O / E G R E S O S X C O M P R O B A R Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, Pago.CveMonedaPago, True, CompraActual.CveTipoConceptoProveedor) + Pago.ImportePago = Pago.ImportePago + Pago.OtroGastoIngreso If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True @@ -9047,6 +9048,7 @@ Public Class ClsPaginas PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649) PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal2.aspx".ToUpper(), -1) PaginaDict.Add("/Finanzas/RepRazonesFinancieras2.aspx".ToUpper(), 1337) + PaginaDict.Add("/Finanzas/RepEstadoFlujoEfectivo.aspx".ToUpper(), 1338) #End Region #Region "Flotillas" PaginaDict.Add("/Flotillas/CatCombustibles.aspx".ToUpper(), 284) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 2e2d188fe..d18d9b3ba 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -2521,76 +2521,7 @@ - - -
    -
    - -
    - -
    - -
    -
    - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    + <%--<%--Reembolsos--%>
    @@ -4292,6 +4223,130 @@ + + + + + + + + + + + + + + + + + + + + <%--MODAL AGREGAR/EDITAR PS--%>