diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index aeab054b8..8f973e376 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -134,6 +134,7 @@ Public Class ClsBancos Public Property TieneTerminal As Boolean Public Property CveCuentaPadre As Integer Public Property CveSubProyecto As Integer + Public Property NumeroSucursal As String #End Region @@ -420,6 +421,7 @@ Public Class ClsBancos Me.TieneTerminal = If(Data.Rows(0)("TieneTerminal").ToString = "True", True, False) Me.CveCuentaPadre = Data.Rows(0)("CveCuentaPadre").ToString.ToEntero Me.CveSubProyecto = Data.Rows(0)("CveSubProyecto").ToString.ToEntero + Me.NumeroSucursal = Data.Rows(0)("NumeroSucursal").ToString End If @@ -454,7 +456,7 @@ Public Class ClsBancos Public Function AddBancosCuentas(CveBanco As Integer, CveTipoCuenta As Integer, NumCuenta As String, CLABE As String, CveMoneda As Integer, DiaCorte As Integer, FInicial As Integer, FActual As Integer, FFinal As Integer, LimiteCredito As Double, FormatoCheque As String, CveUsuario As Integer, CveEmpresa As Integer, ConvenioPagoElectronico As String, UsaLayout As Boolean, UsaTarjeta As Boolean, Optional SaldoInicial As Double = 0, Optional UsaLayoutGrupos As Boolean = False, Optional TieneTerminal As Boolean = False, - Optional CveCuentaPadre As Integer = Nothing, Optional CveSubProyecto As Integer = -1) As Boolean + Optional CveCuentaPadre As Integer = Nothing, Optional CveSubProyecto As Integer = -1, Optional NumeroSucursal As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_BancosCuentasAdd") @@ -482,6 +484,7 @@ Public Class ClsBancos .Add("@TieneTerminal", SqlDbType.Bit).Value = TieneTerminal .Add("@CveCuentaPadre", SqlDbType.Int).Value = CveCuentaPadre .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@NumeroSucursal", SqlDbType.VarChar).Value = NumeroSucursal End With @@ -505,7 +508,7 @@ Public Class ClsBancos Public Function UpdateBancosCuentas(CveBanco As Integer, CveTipoCuenta As Integer, NumCuenta As String, CLABE As String, CveMoneda As Integer, DiaCorte As Integer, FInicial As Integer, FActual As Integer, FFinal As Integer, LimiteCredito As Double, FormatoCheque As String, Estatus As Boolean, CveCuenta As Integer, ConvenioPagoElectronico As String, UsaLayout As Boolean, UsaTarjeta As Boolean, Optional UsaLayoutGrupos As Boolean = False, Optional TieneTerminal As Boolean = False, - Optional CveCuentaPadre As Integer = Nothing, Optional CveSubProyecto As Integer = -1) As Boolean + Optional CveCuentaPadre As Integer = Nothing, Optional CveSubProyecto As Integer = -1, Optional NumeroSucursal As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_BancosCuentasUpdate") @@ -531,6 +534,7 @@ Public Class ClsBancos .Add("@TieneTerminal", SqlDbType.Bit).Value = TieneTerminal .Add("@CveCuentaPadre", SqlDbType.Int).Value = CveCuentaPadre .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@NumeroSucursal", SqlDbType.VarChar).Value = NumeroSucursal End With diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 10d97f41f..912ed24d9 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1594,6 +1594,7 @@ Public Class ClsRH End Property Public Property TipoSangre As String + Public Property CodigoDispersionVale As String = "" #End Region #Region "Personal" @@ -1753,6 +1754,7 @@ Public Class ClsRH CveSubproyectoZona = -1 End If + Me.CodigoDispersionVale = Data.Rows(0)("CodigoDispersionVale").ToString End If Retorno = True @@ -1979,7 +1981,8 @@ Public Class ClsRH NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Beneficiario As String, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1, - Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "A") As Boolean + Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, + Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "A", Optional CodigoDispersionVale As String = "-1") As Boolean Dim Retorno As Boolean = False Dim noguardoXcurp As Boolean = False @@ -2070,6 +2073,8 @@ Public Class ClsRH .Add("@TipoSangre", SqlDbType.VarChar).Value = TipoSangre .Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica .Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo + .Add("@CodigoDispersionVale", SqlDbType.VarChar).Value = CodigoDispersionVale + '.Add("@ErrorMostrarADS", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue @@ -2133,7 +2138,7 @@ Public Class ClsRH Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveMedioTransporte As Integer = -1, Optional EsReserva As Integer = -1, Optional Fiscalizable As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, - Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "") As Boolean + Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "", Optional CodigoDispersionVale As String = "-1") As Boolean Dim Retorno As Boolean = False @@ -2231,7 +2236,7 @@ Public Class ClsRH .Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica .Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo - + .Add("@CodigoDispersionVale", SqlDbType.VarChar).Value = CodigoDispersionVale End With Try diff --git a/App_Code/ClsSAT.vb b/App_Code/ClsSAT.vb index 35de3e019..61a3dc72c 100644 --- a/App_Code/ClsSAT.vb +++ b/App_Code/ClsSAT.vb @@ -4,6 +4,7 @@ Option Explicit On Imports System.Data Imports System.Data.SqlClient Imports System.Net +Imports System.Xml Imports Extensiones Imports GemBox.Spreadsheet @@ -252,6 +253,37 @@ Public Class ClsSAT End Function + Public Function SolicitudesDetalleProcesa(cveSolicitudDetalle As Int32, tipo As Int32, rutaxmls As List(Of String), cveEmpresa As Int32, insertaMetadata As Int32) As Boolean + Dim retorno As Boolean = False + Dim xmlDoc As New XmlDocument() + + ' Crear el elemento raíz + Dim rootElement As XmlElement = xmlDoc.CreateElement("folder") + xmlDoc.AppendChild(rootElement) + + ' Añadir los elementos con el atributo urlfile + For Each url In rutaxmls + Dim archivoElement As XmlElement = xmlDoc.CreateElement("archivo") + archivoElement.SetAttribute("urlfile", url) + rootElement.AppendChild(archivoElement) + Next + DataAdapter("PA_Gral_Sat_SolicitudesDetalleProcesa", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveSolicitudDetalle", SqlDbType.Int).Value = cveSolicitudDetalle + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@Xmlarchivos", SqlDbType.Xml).Value = xmlDoc.ToString() + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@InsertaMetadata", SqlDbType.Int).Value = insertaMetadata + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los registros", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function #Region "LISTADO 69B" diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index c6296441c..7d26e4509 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1763,7 +1763,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetRepPedidosSTF(CveSubProyecto As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean + Public Function GetRepPedidosSTF(CveSubProyecto As Integer, CveVendedor As Integer, CveEmpresa As Integer, Opcion As Integer, FechaInicio As Date, FechaFin As Date) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PedidosSTFRep") @@ -1771,6 +1771,9 @@ Public Class ClsVentas .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin End With Try @@ -3481,25 +3484,25 @@ Public Class ClsVentas End Function #End Region -#Region " CANCELAR PEDIDO " - Public Function CancelarPedido(CveVenta As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Vta_CancelarPedido") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveVenta", SqlDbType.Int).Value = CveVenta - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With + '#Region " CANCELAR PEDIDO " + ' Public Function CancelarPedido(CveVenta As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Vta_CancelarPedido") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al cancelar el pedido.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al cancelar el pedido.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try - Return Retorno - End Function -#End Region + ' Return Retorno + ' End Function + '#End Region #Region "Punto Venta" Public Function GetVta_ReporteCortes(CveEmpresa As Integer, FechaI As Date, FechaF As Date, Optional CveSubProyecto As Integer = -1, Optional CveCorte As Integer = -1) As Boolean diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 54179530f..087ed3309 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2640,10 +2640,10 @@ concep.DescripcionesEspecificas.NumeroSerie) For Each docp As CFDIComplementoPago In ObjCFDITimbre.ComplementoPagos20.ComplementoPagos - Dim MonDiferente As Integer = (From c In docp.DocumentosRelacionados - Where c.MonedaDR <> docp.MonedaP AndAlso docp.MonedaP = "USD" - Select c.MonedaDR).Count() - If MonDiferente > 0 Then cfdi.ContieneVariasMonedas = True 'consideración adicional Rev. B + 'Dim MonDiferente As Integer = (From c In docp.DocumentosRelacionados + ' Where c.MonedaDR <> docp.MonedaP AndAlso docp.MonedaP = "USD" + ' Select Case c.MonedaDR).Count() + 'If MonDiferente > 0 Then cfdi.ContieneVariasMonedas = True 'consideración adicional Rev. B cfdi.Pago20(docp.FechaPago.ToString("yyyy-MM-ddTHH:mm:ss"), docp.FormaDePagoP, diff --git a/Bancos/CuentasBancariasDetalle.aspx b/Bancos/CuentasBancariasDetalle.aspx index a5bf33e69..7c2bb543c 100644 --- a/Bancos/CuentasBancariasDetalle.aspx +++ b/Bancos/CuentasBancariasDetalle.aspx @@ -123,6 +123,14 @@ + + + + + + + + diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb index 2a64a3b22..bffdc7410 100644 --- a/Bancos/CuentasBancariasDetalle.aspx.vb +++ b/Bancos/CuentasBancariasDetalle.aspx.vb @@ -234,11 +234,14 @@ Partial Class Bancos_CuentasBancariasDetalle DdlTipoCuenta_SelectedIndexChanged(DdlTipoCuenta, EventArgs.Empty) + TxtNumeroSucursal.Text = ObjCuentasBancariasDetalle.NumeroSucursal + If UsuarioActual.Empresa.TipoContabilizacion = 1 Then DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaConta.ToString) DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaContaComplementaria.ToString) Else + 'Dim ExisteEnIntems As Boolean = False 'For Each li As ListItem In DDlCuentaContable.Items @@ -293,7 +296,7 @@ Partial Class Bancos_CuentasBancariasDetalle TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0, TxtLimiteCredito.Text.Trim.ToDouble, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkLayout.Checked, TxtConvenio.Text, ""), ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked, TieneTerminal:=ChkTieneTerminal.Checked, - CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero) Then + CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, NumeroSucursal:=TxtNumeroSucursal.Text.Trim) Then ViewState("CveCuenta") = ObjCuentasBancariasDetalle.TCveCuenta Else ErrorUsuarios = True @@ -327,7 +330,7 @@ Partial Class Bancos_CuentasBancariasDetalle If ObjCuentasBancariasDetalle.UpdateBancosCuentas(DdlBanco.SelectedValue.ToEntero, DdlTipoCuenta.SelectedValue.ToEntero, TxtNumCuenta.Text.Trim, TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0, TxtLimiteCredito.Text.Trim.ToDouble, "", ChkEstatus.Checked, CveCuenta, TxtConvenio.Text, ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked, TieneTerminal:=ChkTieneTerminal.Checked, - CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero) Then + CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, NumeroSucursal:=TxtNumeroSucursal.Text.Trim) Then 'CargaDatos() GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing 'If ObjCuentasBancariasDetalle.GetBancosCuentasUsuarios(-1) Then diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index e8da3815a..9f9dcaf4e 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -298,6 +298,7 @@ Partial Class Bancos_PopIEVentas End If CveClienteOriginal = -1 CveSubProyectoVenta = -1 + TxtFechaEmision.Text = Now.ToShortDateString CType(Me.Master, BaseMasterPage).EsPopup = True CType(Me.Master, BaseMasterPage).PopupWidth = 750 diff --git a/CRM/RepAcercamientos.aspx b/CRM/RepAcercamientos.aspx index ca7812381..2b1f94165 100644 --- a/CRM/RepAcercamientos.aspx +++ b/CRM/RepAcercamientos.aspx @@ -166,31 +166,39 @@ - <%--4--%> + + <%--4--%> + + + + + + + <%--5--%> - <%--5--%> + <%--6--%> - <%--6--%> + <%--7--%> - <%--7--%> + <%--8--%> - <%--8--%> + <%--9--%> @@ -209,6 +217,13 @@ + <%--12--%> + + + + + + @@ -280,7 +295,9 @@ - + + + diff --git a/CRM/RepAcercamientos.aspx.cs b/CRM/RepAcercamientos.aspx.cs index d1459a74e..3047138ca 100644 --- a/CRM/RepAcercamientos.aspx.cs +++ b/CRM/RepAcercamientos.aspx.cs @@ -173,13 +173,16 @@ public partial class CRM_RepAcercamientos : ClsPaginas GVDatos.Columns[1].Visible = ChkAcercamiento.Checked; GVDatos.Columns[2].Visible = ChkEtapa.Checked; GVDatos.Columns[3].Visible = ChkMedioCaptacion.Checked; - GVDatos.Columns[4].Visible = ChkVendedor.Checked; - GVDatos.Columns[5].Visible = ChkImporte.Checked; - GVDatos.Columns[6].Visible = ChkApertura.Checked; - GVDatos.Columns[7].Visible = ChkCierre.Checked; - GVDatos.Columns[8].Visible = ChkPS.Checked; - GVDatos.Columns[9].Visible = ChkEnPausa.Checked; - GVDatos.Columns[10].Visible = ChkGiro.Checked; + GVDatos.Columns[4].Visible = ChkMedioCaptacion.Checked; + + GVDatos.Columns[5].Visible = ChkVendedor.Checked; + GVDatos.Columns[6].Visible = ChkImporte.Checked; + GVDatos.Columns[7].Visible = ChkApertura.Checked; + GVDatos.Columns[8].Visible = ChkCierre.Checked; + GVDatos.Columns[9].Visible = ChkPS.Checked; + GVDatos.Columns[10].Visible = ChkEnPausa.Checked; + GVDatos.Columns[11].Visible = ChkGiro.Checked; + GVDatos.Columns[12].Visible = ChkClasificacion.Checked; UPDatos.Update(); diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index 1f9e235c0..fcfc33ffb 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -964,8 +964,9 @@ Partial Class Contratos_Default TipoContrato = ObjContratos.CveContratoTipo TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero - TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString - + TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString + + If CveContratoTipo = 33 Then TabContratosGastos.Visible = False TabAF.Visible = False @@ -1106,6 +1107,8 @@ Partial Class Contratos_Default ChkFacAutomatica.Checked = CBool(ObjContratos.DtResultados.Rows(0)("FacturacionCiclicaAutomatico")) DdlDiaFact.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("DiaMesFacturacion").ToString()) TxtObservaciones.Text = ObjContratos.DtResultados.Rows(0)("Observaciones").ToString + TxtObsGeneral.Text = ObjContratos.DtResultados.Rows(0)("ObservacionesGenerales").ToString + ChkAplicaFacCiclica_CheckedChanged(ChkAplicaFacCiclica, EventArgs.Empty) If ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString().ToEntero() > 0 Then @@ -1387,7 +1390,8 @@ Partial Class Contratos_Default PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero, TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero, CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=DdlClienteDireccionEnvio.SelectedValue.ToEntero, AplicaImpuestosLocales:=ChkImpuestosLocales.Checked, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), - FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero())) + FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero()), + ObservacionesGenerales:=TxtObsGeneral.Text.Trim) TieneError = Not GuardaFianzas(ObjContratos) diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index 4d9f4b82e..fa8c75001 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -1417,6 +1417,12 @@ CssClass="lnkMovotPermanente" runat="server" Text='<%# Eval("MontoLimite","{0:###,###.##}")%>'> + + + + + @@ -1432,202 +1438,7 @@ - + @@ -5036,6 +4847,7 @@ + @@ -5043,6 +4855,7 @@ + @@ -5283,7 +5096,202 @@ + diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index e44d7e309..0ca01bdac 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -710,7 +710,7 @@ public partial class Nomina_Nomina2 : ClsPaginas LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 && dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0); } - } + } } @@ -7198,11 +7198,12 @@ public partial class Nomina_Nomina2 : ClsPaginas } using (ClsNominas ObjMovt = new ClsNominas()) { - ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente); + ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente); GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados; GVMovtoPermanenteSaldos.DataBind(); - } - + } + + CargaConcepto(); DdlConcepto.SelectedValueExist(cveConcepto); TxtDescripcion.Text = descripcion.ToString(); @@ -8796,7 +8797,7 @@ public partial class Nomina_Nomina2 : ClsPaginas protected void BtnGeneratepdf_Click(object sender, EventArgs e) { byte[] pdf = new byte[1]; - string nombre = "recibo"; + string nombre = $"recibos {LtlPeriodoseleccionado.Text}"; bool confiniquito = false; int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero(); if (CvePersonal > 0) @@ -8805,7 +8806,7 @@ public partial class Nomina_Nomina2 : ClsPaginas { if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) { - nombre = ObjNomina.SerieFolio; + nombre = $"{ObjNomina.Codigo}{ObjNomina.Nombre} {ObjNomina.SerieFolio}"; } if (ObjNomina.GetNom_NominasDetalles(-1, CvePersonal, CvePeriodo, "-1")) @@ -9998,6 +9999,75 @@ public partial class Nomina_Nomina2 : ClsPaginas } + + protected void BtnEfectivaleXLS_Click(object sender, EventArgs e) + { + + + ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook(); + + var libro = wb.AddWorksheet("Layout"); + int row = 1; + int column = 1; + + libro.Cell(row, column++).Value = "XSUBTOTAL"; + //libro.Cell(row, column++).Value = ""; + row = row + 1; + column = 1; + + libro.Cell(row, column++).Value = "XCLIENTE"; + libro.Cell(row, column++).Value = "XTIPOPEDIDO"; + libro.Cell(row, column++).Value = "XNUMERO"; + libro.Cell(row, column++).Value = "XIMPORTE"; + //libro.Cell(row, column++).Value = "CLABE"; + //libro.Cell(row, column++).Value = "Neto"; + int maxxolumn = column; + libro.Range(row, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + libro.Range(row, 1, row, column - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189)); + DataRow dcon; + decimal subtotal = 0; + if (dtempleados != null && dtempleados.Rows.Count > 0 && dtConceptos != null && dtConceptos.Rows.Count > 0 && (dcon = dtConceptos.FiltroPrimero("Tipo ='P' AND Codigo = 'P028' ")) != null) + { + foreach (DataRow dRow in dtempleados.FiltraParametros("CvePersonal > 0").Rows) + { + decimal importe = dRow[string.Format("V_{0}", dcon["CveConcepto"])].ToString().ToDecimal(); + if (importe > 0) + { + subtotal = subtotal + importe; + row++; + column = 1; + libro.Cell(row, column++).Value = "'103646-1"; + libro.Cell(row, column++).Value = "'DISPERSION"; + libro.Cell(row, column++).Value = string.Format("'{0}", dRow["Codigo"]); + libro.Cell(row, column++).Value = importe; + } + } + } + libro.Cell(1, 2).Value = subtotal; + + libro.Columns().AdjustToContents(); // Adjust columns to fit content + + System.IO.Stream fs = new System.IO.MemoryStream(); + wb.SaveAs(fs); + fs.Position = 0; + System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(); + using (System.IO.Stream input = fs) + + { + input.CopyTo(memoryStream); + } + memoryStream.Position = 0; + + Response.Clear(); + Response.Buffer = true; + + Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; + Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago")); + Response.BinaryWrite(memoryStream.ToArray()); + Response.End(); + + + } protected void BtnModalBancosProcesar_Click(object sender, EventArgs e) { @@ -10022,7 +10092,7 @@ public partial class Nomina_Nomina2 : ClsPaginas } } - } + } else if (Banco == Bancos.Banamex) { using (ClsNominas objnom = new ClsNominas()) @@ -10264,8 +10334,8 @@ public partial class Nomina_Nomina2 : ClsPaginas } - } - + } + private void CrearLayoutNominaBanamex(DataTable DTNomina) { StringBuilder sb = new StringBuilder(); @@ -10275,7 +10345,7 @@ public partial class Nomina_Nomina2 : ClsPaginas SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout"); - foreach (DataRow dRow in DTNomina.Rows) + foreach (DataRow dRow in DTNomina.FiltraParametros("UPPER(BancoNombre) like '%BANAMEX%'").Rows) { //string RFC = dRow["RFC"].ToString(); string Nombre = dRow["Nombre"].ToString(); @@ -10306,54 +10376,53 @@ public partial class Nomina_Nomina2 : ClsPaginas } } - ErroresValidaciones = false; - - //LAYOUT “C” FORMATOS PARA IMPORTACIÓN (TEF / TEF INTELAR) - //DOC: https://www.banamex.com/resources/bancanets/premium/esp/contenedor/archivos/TEF_Version_C_PagosCobros_Masivos.pdf + ErroresValidaciones = false; + + //LAYOUT “C” FORMATOS PARA IMPORTACIÓN (TEF / TEF INTELAR) + //DOC: https://www.banamex.com/resources/bancanets/premium/esp/contenedor/archivos/TEF_Version_C_PagosCobros_Masivos.pdf if (!ErroresValidaciones) - { - DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa); - DataRow RowCuenta = DTCuentas.FiltroPrimero($"CveCuenta={DdlCuenta.SelectedValue}"); - var ClaveMoneda = "001"; // PESOS MEXICANOS - - //REGISTRO DE CONTROL - IMPORTACIÓN - var TipoRegistro = "1"; - var NumeroCliente = ("111511111111").Trim().PadLeft(12, '0'); //CONVENIO - - var Fecha = TxtModalLayoutBancosFecha.Text.ToDate(); - var FechaPago = $"{Fecha.Day.ToString().PadLeft(2, '0')}{Fecha.ToString("MM")}{Fecha.Year.ToString().Replace("20", "")}"; - var Secuencia = (1).ToString("0000"); - var RazonSocial = (UsuarioActual.Empresa.Empresa).Replace("-Prueba", "").Trim().PadRight(36); - var Descripcion = ("TEST").Trim().PadRight(20); - var Naturaleza = "12"; //= 12 Pagos interbancarios CLABE, 05 Nomina banamex - var Instrucciones = ("").Trim().PadRight(40); - var Version = "C"; - var Volumen = "0"; - var Caracteristicas = "1"; // 0= Si es modificable, 1 = Solo lectura - - sb.AppendLine($"{TipoRegistro}{NumeroCliente}{FechaPago}{Secuencia}{RazonSocial}{Descripcion}{Naturaleza}{Instrucciones}{Version}{Volumen}{Caracteristicas}"); - - - //REGISTRO GLOBAL - IMPORTACIÓN - var TipoReg2 = "2"; - var TipoOpe2 = "1"; //0 = Si es Abono, 1 = Si es Cargo - var ImporteTotal = DTNomina.SUMD("Importe").ToString("0000000000000000.00").Replace(".", "");//16 enteros y 2 decimales - var TipoCuenta = "01"; //CUENTA DE CHEQUES - var Sucursal = "5555"; - var NumCuenta = ("9999999").Trim().PadLeft(20, '0'); //OBTENER DE BANCOS CUENTAS - var Espacio = ("").Trim().PadRight(20); - - sb.AppendLine($"{TipoReg2}{TipoOpe2}{ClaveMoneda}{ImporteTotal}{TipoCuenta}{Sucursal}{NumCuenta}{Espacio}"); - - //REGISTRO DE CARGOS O ABONOS INDIVIDUALES - IMPORTACIÓN - int Count = 1; + { + + DataRow RowCuenta = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta: DdlCuenta.SelectedValue.ToEntero(), CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero(""); + var ClaveMoneda = "001"; // PESOS MEXICANOS + + //REGISTRO DE CONTROL - IMPORTACIÓN + var TipoRegistro = "1"; + var NumeroCliente = RowCuenta["Convenio"].ToString().Trim().PadLeft(12, '0'); //CONVENIO + + var Fecha = TxtModalLayoutBancosFecha.Text.ToDate(); + var FechaPago = $"{Fecha.Day.ToString().PadLeft(2, '0')}{Fecha.ToString("MM")}{Fecha.Year.ToString().Replace("20", "")}"; + var Secuencia = (1).ToString("0000"); + var RazonSocial = (UsuarioActual.Empresa.Empresa).Replace("-Prueba", "").Trim().PadRight(36); + var Descripcion = ("NOMINA").Trim().PadRight(20); + var Naturaleza = "05"; //= 12 Pagos interbancarios CLABE, 05 Nomina banamex + var Instrucciones = ("").Trim().PadRight(40); + var Version = "C"; + var Volumen = "0"; + var Caracteristicas = "1"; // 0= Si es modificable, 1 = Solo lectura + + sb.AppendLine($"{TipoRegistro}{NumeroCliente}{FechaPago}{Secuencia}{RazonSocial}{Descripcion}{Naturaleza}{Instrucciones}{Version}{Volumen}{Caracteristicas}"); + + //REGISTRO GLOBAL - IMPORTACIÓN + var TipoReg2 = "2"; + var TipoOpe2 = "1"; //0 = Si es Abono, 1 = Si es Cargo + var ImporteTotal = DTNomina.SUMD("Importe").ToString("0000000000000000.00").Replace(".", "");//16 enteros y 2 decimales + var TipoCuenta = "01"; //CUENTA DE CHEQUES + var Sucursal = RowCuenta["NumeroSucursal"].ToString(); + var NumCuenta = RowCuenta["NumCuenta"].ToString().Trim().PadLeft(20, '0'); //OBTENER DE BANCOS CUENTAS + var Espacio = ("").Trim().PadRight(20); + + sb.AppendLine($"{TipoReg2}{TipoOpe2}{ClaveMoneda}{ImporteTotal}{TipoCuenta}{Sucursal}{NumCuenta}{Espacio}"); + + //REGISTRO DE CARGOS O ABONOS INDIVIDUALES - IMPORTACIÓN + int Count = 1; foreach (DataRow dRow in DTNomina.Rows) { var TipoReg3 = "3"; //Registro de Movtos. Individuales var TipoOpe3 = "0"; //0 = Si es Abono, 1 = Si es Cargo (solo aplica para cobros) string Nombres = dRow["Nombres"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); - string APaterno = dRow["APaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); + string APaterno = dRow["APaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); string AMaterno = dRow["AMaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); //string BancoNumCuenta = dRow["BancoNumCuenta"].ToString(); @@ -10361,27 +10430,25 @@ public partial class Nomina_Nomina2 : ClsPaginas decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2); var StrImporte = Importe.ToString("0000000000000000.00").Replace(".", ""); - var StrTipoCuenta = "01";// 01- Cheques / CLABE + var StrTipoCuenta = "03";// 01- Cheques / CLABE, 03=Plástico var StrCuenta = BancoNumCuenta.Trim().PadLeft(20, '0'); //USARA TARJETA DE DEBITO - var ReferenciaAlfa = ("PAGO03072024NOM").PadRight(40); //No se ocupa si es nomina banamex - var Beneficiario = ($"{Nombres},{APaterno}/{AMaterno}").PadRight(55); - var Inst3 = ("").PadRight(40); - var DescTEF = ("").PadRight(24); - var ClaveBanco = ("0012").PadRight(4); //BANCOMER //No se ocupa si es nomina baname - var ReferenciaNum = ("2222222").PadRight(7, '0'); //QUE TOME DE LA CvePersonal como folio - var Plazo = "00"; // MISMO DIA - + var ReferenciaAlfa = ("").PadRight(40); //No se ocupa si es nomina banamex + var Beneficiario = ($"{Nombres},{APaterno}/{AMaterno}").PadRight(55); + var Inst3 = ("").PadRight(40); + var DescTEF = ("").PadRight(24); + var ClaveBanco = ("").PadRight(4); //BANCOMER //No se ocupa si es nomina baname + var ReferenciaNum = dRow["Codigo"].ToString().PadRight(7, '0'); //QUE TOME DE LA CvePersonal como folio + var Plazo = "00"; // MISMO DIA sb.AppendLine($"{TipoReg3}{TipoOpe3}{ClaveMoneda}{StrImporte}{StrTipoCuenta}{StrCuenta}{ReferenciaAlfa}{Beneficiario}{Inst3}{DescTEF}{ClaveBanco}{ReferenciaNum}{Plazo}00"); - Count = Count + 1; } //REGISTRO DE TOTALES - IMPORTACIÓN - var TipoReg4 = "4"; - var NumAbonos = Count.ToString("000000"); - var NumCargos = Count.ToString("000000"); - + var TipoReg4 = "4"; + var NumAbonos = Count.ToString("000000"); + var NumCargos = Count.ToString("000000"); + sb.AppendLine($"{TipoReg4}{ClaveMoneda}{NumAbonos}{ImporteTotal}{NumCargos}{ImporteTotal}"); Response.Clear(); diff --git a/RH/Personal.aspx b/RH/Personal.aspx index c433299bf..cf8e23ddf 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -1615,12 +1615,28 @@ -
- - - + + + +
+
+
+ + + +
+
+
+
+ + + +
+
+ +
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 4b10b8342..00414fc4a 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1057,6 +1057,7 @@ Partial Class RH_Personal If UsuarioActual.CveRol = 1 Or UsuarioActual.CveUsuario = 100 Then DVNetoPeriodo.Visible = True + DVCodigoDispersionVale.Visible = True End If @@ -1878,6 +1879,8 @@ Partial Class RH_Personal DdlRegistroPatronal.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CveRegistroPatronal").ToString) DdlEmpresaAsignada.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CveEmpresaAsignado").ToString) + TxtCodigoDispersionVale.Text = ObjPersonal.CodigoDispersionVale + 'Carga Incidencias BtnConsultarAsistencia_Click(Me, New System.EventArgs) @@ -2053,7 +2056,7 @@ Partial Class RH_Personal TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked, Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero, CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo, - AreaGeografica:=DdlAreageografica.SelectedValue) Then + AreaGeografica:=DdlAreageografica.SelectedValue, CodigoDispersionVale:=TxtCodigoDispersionVale.Text.Trim) Then If Archivo.Exists Then @@ -2140,7 +2143,7 @@ Partial Class RH_Personal CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero(), EsReserva:=If(chkEsReserva.Checked, 1, 0), Fiscalizable:=If(chkNoFiscalizar.Checked, 0, 1), CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo, - AreaGeografica:=DdlAreageografica.SelectedValue) Then + AreaGeografica:=DdlAreageografica.SelectedValue, CodigoDispersionVale:=TxtCodigoDispersionVale.Text.Trim) Then 'Funcion usa RH Familiares If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then diff --git a/SAT/SolicitudesIngresoSat.aspx b/SAT/SolicitudesIngresoSat.aspx index bdacc82d4..7273d458d 100644 --- a/SAT/SolicitudesIngresoSat.aspx +++ b/SAT/SolicitudesIngresoSat.aspx @@ -61,6 +61,9 @@
  • Solicitudes
  • +
  • + Caga XML Local +
  • @@ -155,7 +158,7 @@
    -
    + @@ -557,7 +560,42 @@
    + +
    - +
    @@ -7970,6 +7970,11 @@
    +
    +
    + +
    +