From fbd7609b12d73d47a18d3b95cf7ee4ca4334d257 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 15 May 2023 17:38:58 -0700 Subject: [PATCH 01/10] =?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/10] -- 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/10] =?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/10] -- 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/10] -- 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/10] =?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/10] -- 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 498be4d8d36ca459c2627a2dfb46517109749c81 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 May 2023 11:53:39 -0700 Subject: [PATCH 08/10] =?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 3795097a6f486720f610637d29033ffaf5761928 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 May 2023 11:54:57 -0700 Subject: [PATCH 09/10] -- cuentas asignadas de AF --- App_Code/ClsContabilidad.vb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 994ef7716..653f8f120 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1773,7 +1773,12 @@ Public Class ClsContabilidad #End Region - Public Function GetCuentasConceptos(CveTipoSaldo As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveCuentaBancos As Integer = -1, Optional CvePersonal As Integer = -1) As Boolean + Public Function GetCuentasConceptos(CveTipoSaldo As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1, + Optional CveProveedor As Integer = -1, + Optional CveClasificacion As Integer = -1, + Optional CveCuentaBancos As Integer = -1, + Optional CvePersonal As Integer = -1, + Optional CveAF As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasConceptosGet") With SqlAdapter.SelectCommand.Parameters @@ -1784,6 +1789,7 @@ Public Class ClsContabilidad .Add("@CveCuentaBancos", SqlDbType.Int).Value = CveCuentaBancos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveAF", SqlDbType.Int).Value = CveAF End With Try SqlAdapter.Fill(Data) @@ -4803,7 +4809,7 @@ Public Class ClsContabilidad Dim Retorno As Boolean = False - DataAdapter("PA_Conta_UpdateCuentas") + DataAdapter("PA_Conta_CuentasUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta @@ -4844,7 +4850,7 @@ Public Class ClsContabilidad Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional CveBancoCuenta As Integer = -1) As Integer Dim Retorno As Integer = 0 - DataAdapter("PA_Conta_AddCuentas") + DataAdapter("PA_Conta_CuentasAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CvePadre", SqlDbType.Int).Value = CvePadre @@ -4892,7 +4898,7 @@ Public Class ClsContabilidad Return False End If - DataAdapter("PA_Conta_RemoveCuentas") + DataAdapter("PA_Conta_CuentasRemove") With SqlAdapter.SelectCommand.Parameters .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta From 4cdd4907a5ad6e62ba8d17f9a3b36bae15170c8a Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 May 2023 11:55:20 -0700 Subject: [PATCH 10/10] --ver cuentas asignas en tipoconta=1 --- AF/AF.aspx | 11 ++++++++++- AF/AF.aspx.vb | 29 +++++++++++++++++++++-------- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/AF/AF.aspx b/AF/AF.aspx index 15b22ec92..eba0ec925 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -312,7 +312,16 @@
    - +
    + + + + + + + + +
    diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 97108838c..923275083 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -375,11 +375,8 @@ Partial Class AF_AF If Not IsPostBack Then InicializaValores() - - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.UsaContabilidad) Then - CargaCuentasContables() - End If - + + CargaCombos() If Request("CveActivoFijo") IsNot Nothing AndAlso IsNumeric(Request("CveActivoFijo")) AndAlso Request("CveActivoFijo").ToEntero > 0 Then @@ -1050,6 +1047,13 @@ Partial Class AF_AF If LtFechaCompra.Text <> "" Then LtFechaFinDepreciación.Text = ObjActivoFijo.FechaCompra.AddMonths(ObjActivoFijo.MesesDepreciacion).ToShortDateString + End If + + If UsuarioActual.Empresa.TipoContabilidad = 1 Then + CargaCuentasConceptos() + divCuentas.Visible = True + ElseIf UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.UsaContabilidad) Then + CargaCuentasContables() End If CargaAFPAdreEHijos() @@ -3106,9 +3110,8 @@ Partial Class AF_AF #Region "CARGAR CUENTA CONTABLE" Private Sub CargaCuentasContables() - trCuentaContable.Visible = True - - + trCuentaContable.Visible = True + Dim Conta As New ClsContPAQi(UsuarioActual.Empresa) Dim DtCuentas As New DataTable Dim CuentaPadre = UsuarioActual.Empresa.Funcionalidad(221).ToEntero @@ -3130,6 +3133,16 @@ Partial Class AF_AF End Sub + Private Sub CargaCuentasConceptos() + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentasConceptos(10, UsuarioActual.CveEmpresa, CveAF:=CveActivoFijo) Then + GvCta.DataSource = ObjConta.DtResultados + divCuentas.Visible = True + End If + ObjConta.Dispose() + GvCta.DataBind() + + End Sub Private Sub ActivarRegistroCuentaAF() If DdlCtaContable.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(221).ToEntero > 0 Then BtnCtaContable.Visible = True