diff --git a/App_Code/ClsFinanzas.vb b/App_Code/ClsFinanzas.vb index 20a6fdb07..238079690 100644 --- a/App_Code/ClsFinanzas.vb +++ b/App_Code/ClsFinanzas.vb @@ -258,6 +258,58 @@ Public Class ClsFinanzas Return Retorno End Function + + Public Function GetRazonesFinancierasEstadoResultadosRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Finan_RF_EstadoResultadosRepGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .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 + + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar el Reporte de Razones Financieras (2).", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + + Public Function GetRazonesFinancierasRatiosRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Finan_RF_RatiosRepGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .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 + + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar el Reporte de Ratios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + #Region "RazonesFinancierasCuentas" Public Function AddRazonesFinancierasCuentas(CveRazonFinancieraConcepto As Integer, CveCuenta As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 96d4d0143..e285a7287 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7681,6 +7681,8 @@ Public Class ClsPaginas Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor) 'cuando el Pago viene por NC, se utiliza un concepto If Pago.TipoPago.Contiene("NC", "DEV") Then If CompraActual.CveMoneda = 2 Then ConPreP.CveConcepto = 304 Else ConPreP.CveConcepto = 272 'pago nota de crédito ME + 'cuando el Pago viene por Venta, se utiliza un concepto + 'If Pago.TipoPago.Contiene("Venta") Then If CompraActual.CveMoneda = 2 Then ConPreP.CveConcepto = 275 Else ConPreP.CveConcepto = 275 'Pago Compra con Venta Dim Concepto As String = String.Format("{0} F:{1}", CompraActual.ProveedorNombre, CompraActual.SerieFolio) Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) @@ -8192,10 +8194,10 @@ Public Class ClsPaginas End If 'movimiento de pago cliente - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, Contabilizable:=Contabilizable) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada, Contabilizable:=Contabilizable) Then ErrorMovtos = True 'movimiento de pago cliente Complementaria If Not ErrorMovtos AndAlso VentaActual.CveMoneda > 1 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, Contabilizable:=Contabilizable) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada, Contabilizable:=Contabilizable) Then ErrorMovtos = True End If If Pago.AplicaTraslado Then 'si tiene iva y su proporcion @@ -8203,10 +8205,10 @@ Public Class ClsPaginas ImporteMovimiento = (PorcentajePago * VentaActual.IVA).RoundSQL ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 61, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 61, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True End If End If 'si tiene RET IVA y su proporcion @@ -8214,20 +8216,20 @@ Public Class ClsPaginas ImporteMovimiento = (PorcentajePago * VentaActual.RetIVA).RoundSQL ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True End If 'si tiene Ret ISR y su proporcion If Not ErrorMovtos AndAlso VentaActual.RetISR > 0 Then ImporteMovimiento = (PorcentajePago * VentaActual.RetISR).RoundSQL ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True End If 'si tiene IEPS y su proporcion If Not ErrorMovtos AndAlso VentaActual.IEPS > 0 Then @@ -8239,10 +8241,10 @@ Public Class ClsPaginas If ObjConta.GetRetCuenta(38, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero If ObjConta.GetRetCuenta(39, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True End If 'concepto pago Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia) @@ -8992,6 +8994,7 @@ Public Class ClsPaginas PaginaDict.Add("/Finanzas/RepRotacionCartera.aspx".ToUpper(), 649) PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649) PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal2.aspx".ToUpper(), -1) + PaginaDict.Add("/Finanzas/RepRazonesFinancieras2.aspx".ToUpper(), 1337) #End Region #Region "Flotillas" PaginaDict.Add("/Flotillas/CatCombustibles.aspx".ToUpper(), 284) diff --git a/Bancos/PopIECompras.aspx b/Bancos/PopIECompras.aspx index 68b5d172c..8f4cf2a6a 100644 --- a/Bancos/PopIECompras.aspx +++ b/Bancos/PopIECompras.aspx @@ -443,7 +443,7 @@
- diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 01a53afc1..9e161e4eb 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -33,7 +33,7 @@ Partial Class Bancos_PopIECompras 'Configuración Private Property CveIE As Integer Get - Return ViewState("CveIE").ToString.ToEntero + Return IfNull(ViewState("CveIE"), "0").ToString.ToEntero End Get Set(value As Integer) ViewState("CveIE") = value @@ -315,6 +315,12 @@ Partial Class Bancos_PopIECompras End Get End Property + Private ReadOnly Property NombreCliente As String + Get + Return ViewState("NombreCliente").ToString + End Get + End Property + Private Property NotificarA As String Get If ViewState("NotificarA") Is Nothing Then @@ -814,6 +820,7 @@ Partial Class Bancos_PopIECompras ViewState("IdCtaContRetISRCliente") = dtc.Rows(0)("IdCtaContRetISR") ViewState("IdCtaContComplementariaCliente") = dtc.Rows(0)("IdCtaContComplementaria") ViewState("IdCtaContMonedaExtranjeraCliente") = dtc.Rows(0)("IdCtaContMonedaExtranjera") + ViewState("NombreCliente") = dtc.Rows(0)("Nombre") If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, -1) Then @@ -1499,6 +1506,8 @@ Partial Class Bancos_PopIECompras If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" + Else + Exit For End If End If Next @@ -1520,6 +1529,8 @@ Partial Class Bancos_PopIECompras Pago.TipoPago = "DD" If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" + Else + Exit For End If End If Next @@ -1541,7 +1552,10 @@ Partial Class Bancos_PopIECompras Pago.TipoPago = "DD" If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" + Else + Exit For End If + End If Next @@ -1561,17 +1575,20 @@ Partial Class Bancos_PopIECompras End If If MsgError = "" Then - Dim VentaActual As New Venta With {.CveVenta = rw.DataKey("CveVenta").ToEntero, .CveCliente = rw.DataKey("CveCliente").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal} + Dim VentaActual As New Venta With {.CveVenta = rw.DataKey("CveVenta").ToEntero, .ClienteNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveCliente = rw.DataKey("CveCliente").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero} Dim PagoVenta As New VentaPago PagoVenta.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero PagoVenta.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + PagoVenta.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal PagoVenta.TCPago = rw.DataKey("TipoCambio").ToDecimal PagoVenta.CveCompraRelacionada = CompraActual.CveCompra - PagoVenta.TipoPago = "XX" + PagoVenta.TipoPago = "Venta" If AplicaPrePolizaPagoVenta(VentaActual, PagoVenta, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" End If + Else + Exit For End If End If Next @@ -1579,28 +1596,44 @@ Partial Class Bancos_PopIECompras Case Else ImportePagado = 0 End Select + Dim ObjConta As ClsContPAQi = Nothing If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then If ObjMov.ValorPolizaDescuadre > 0 Then MsgError = ObjMov.MensajePolizaDescuadre GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + Else + If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad Then + ObjConta = New ClsContPAQi(UsuarioActual.Empresa) + ObjConta.IniciaTransacSQL() + End If + If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then + IdPoliza = ObjMov.ContaIdPoliza + Else + Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) + MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" + End If + End If End If End If If MsgError = "" Then - ObjIE.Commit() + + ObjIE.Commit() + If ObjConta IsNot Nothing Then ObjConta.Commit() Dim StrMsg As New StringBuilder StrMsg.Append("El Documento se guardó correctamente.
") If TipoTransaccion = "Egs" AndAlso CveIE > 0 Then GeneraChequePDF(CveIE, UsuarioActual.Empresa) - If IdPoliza > 0 Then - StrMsg.AppendFormat("
Ver Póliza", IdPoliza) - End If + If IdPoliza > 0 Then StrMsg.AppendFormat("
Ver Póliza", IdPoliza) + If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False) Else - ObjIE.RollBack() + ObjIE.RollBack() + If ObjConta IsNot Nothing Then ObjConta.RollBack() Alert(MsgError, TipoMensaje.MsgError) End If diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 4165a41c9..75c12338f 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -868,7 +868,7 @@
- + diff --git a/Contabilidad/PopUpAuxiliar.aspx b/Contabilidad/PopUpAuxiliar.aspx index 0a5826bef..a2f4ca566 100644 --- a/Contabilidad/PopUpAuxiliar.aspx +++ b/Contabilidad/PopUpAuxiliar.aspx @@ -81,7 +81,7 @@ - + Fecha @@ -120,7 +120,7 @@ - Num. Póliza + Póliza diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb index 21da35698..72c7cfed2 100644 --- a/Contabilidad/PopUpAuxiliar.aspx.vb +++ b/Contabilidad/PopUpAuxiliar.aspx.vb @@ -177,16 +177,16 @@ Partial Class PopUpAuxiliar e.Row.Cells(7).Visible = False e.Row.Cells(8).Visible = False e.Row.Cells(12).Visible = False - ElseIf e.Row.RowIndex = 1 Then - e.Row.Cells(0).Width = Unit.Pixel(95) - e.Row.Cells(1).Width = Unit.Pixel(180) - e.Row.Cells(2).Width = Unit.Pixel(80) - e.Row.Cells(3).Width = Unit.Pixel(80) - e.Row.Cells(4).Width = Unit.Pixel(83) - e.Row.Cells(5).Width = Unit.Pixel(93) - e.Row.Cells(6).Width = Unit.Pixel(85) - e.Row.Cells(7).Width = Unit.Pixel(95) - e.Row.Cells(8).Width = Unit.Pixel(70) + 'ElseIf e.Row.RowIndex = 1 Then + ' e.Row.Cells(0).Width = Unit.Pixel(95) + ' e.Row.Cells(1).Width = Unit.Pixel(180) + ' e.Row.Cells(2).Width = Unit.Pixel(80) + ' e.Row.Cells(3).Width = Unit.Pixel(80) + ' e.Row.Cells(4).Width = Unit.Pixel(83) + ' e.Row.Cells(5).Width = Unit.Pixel(93) + ' e.Row.Cells(6).Width = Unit.Pixel(85) + ' e.Row.Cells(7).Width = Unit.Pixel(95) + ' e.Row.Cells(8).Width = Unit.Pixel(70) End If e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index c39b56c1a..a60d0febb 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -215,7 +215,7 @@ Partial Class ContabilidadC_RegPrePoliza If Not Page.IsPostBack Then Tick = DateTime.Now.Ticks.ToString() - If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then + If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS")) End If diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 318d0706f..75e9ceaf2 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -310,9 +310,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If - - - Exit Sub ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then @@ -450,7 +447,6 @@ Partial Class ContabilidadC_RegPrePolizaS If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("") If dr IsNot Nothing Then - 'DivAgregarConceptos.Visible = False DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza") TxtFechaDocumento.Text = dr("Fecha") TxtConcepto.Text = dr("Concepto") @@ -461,7 +457,6 @@ Partial Class ContabilidadC_RegPrePolizaS TxtFolio.Text = dr("FolioPoliza").ToString TxtUsuarioElaboro.Text = dr("Usuario").ToString TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy") - ' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva") CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString If UsuarioActual.CveRol = 1 Then @@ -469,7 +464,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then - 'DivAgregarConceptos.Visible = True LnkAddConcepto.Visible = True CargaConceptos() CargaSubProyectos() @@ -518,52 +512,36 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.Columns(7).Visible = True End If - If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,17)").Rows.Count > 0 Then + If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,17,292,308)").Rows.Count > 0 Then LnkComplementoPago.Visible = True End If - If dr("FolioPoliza").ToString = "" OrElse dr("FolioPoliza").ToString = "0" Then BtnContabilizar.Visible = True End If If UsuarioActual.Empresa.TipoContabilizacion = 1 Then - If dr("FolioPoliza").ToString.ToEntero > 0 Then + If dr("FolioPoliza").ToString.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then divContabilizada.Visible = True Folio = dr("FolioPoliza").ToString - End If Else - If dr("IdPoliza").ToString.ToEntero > 0 Then + If dr("IdPoliza").ToString.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza")) divContabilizada.Visible = True IdPoliza = dr("IdPoliza").ToString.ToEntero - ElseIf TxtTotalCargos.Text.ToDecimal = TxtTotalAbonos.Text.ToDecimal Then - 'sino está contabilizada, se activa el botón - ' BtnContabilizar.Visible = True End If End If - 'divDatosPrincipales.Visible = False - 'divObservaciones.Visible = False - UpPrePoliza.Update() - RegistraScript("comparar();") - If Request("Tipo") IsNot Nothing AndAlso IsNumeric(Request("Tipo")) AndAlso Request("Tipo").ToEntero = 1 AndAlso UsuarioActual.CveUsuario <> 100 Then - 'For Each row As GridViewRow In GvPrePoliza.Rows - ' row.FCTextBox("TxtCargo").Enabled = False - ' row.FCTextBox("TxtAbono").Enabled = False - 'Next - End If LnkExcel.Visible = False LnkImprimirPDF.Visible = True Else Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia) BtnEliminar.Visible = False End If - End If ObjContabilidad.Dispose() diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index 3ec01dd77..009282029 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -163,20 +163,23 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero) DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo").ToEntero) DdlActivoFijo.Enabled = False - - Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero - DdlClientes.ddl.SelectedValueExist(CveCliente) + If CveCliente > 0 Then + Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre") + DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente)) + DdlClientes.SelectedValue = CveCliente + DdlClientes.SelectedText = drp + End If If CvePersonal > 0 Then Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto") - - DdlPersonal.ddl.Items.Add(New ListItem(drp, CvePersonal)) - + DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal)) + DdlPersonal.SelectedValue = CvePersonal + DdlPersonal.SelectedText = drp End If - DdlPersonal.ddl.SelectedValueExist(CvePersonal) + LbAgregar.Text = "Actualizar" UpModalModulos.Update() RegistraScript("$('#ModalCat').modal();") diff --git a/Empresas/119/Formatos/CHQ-7260.rdlc b/Empresas/119/Formatos/CHQ-7260.rdlc index 24ae6ff90..0b58cd17b 100644 --- a/Empresas/119/Formatos/CHQ-7260.rdlc +++ b/Empresas/119/Formatos/CHQ-7260.rdlc @@ -1,498 +1,5 @@ - - - - - true - true - - - - - - - - - =Parameters!Folio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =UCASE(day(Parameters!Fecha.Value) & " DE " & CHOOSE(MONTH(Parameters!Fecha.Value),"Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre") & " DE " & year(Parameters!Fecha.Value)) - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ImporteLetra.Value - - - - - - - Textbox1 - 3.73754cm - 1.11125cm - 0.6cm - 14.79409cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Beneficiario.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Importe.Value - - - - - - - Textbox1 - 2.78553cm - 16.60737cm - 0.75875cm - 3.23497cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.35611cm - - - 11.2824cm - - - 2.29715cm - - - 2.63229cm - - - - - 0.54708cm - - - - - true - true - - - - - =Fields!CODIGO.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cuenta.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cargo.Value - - - - - - - Cargo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Abono.Value - - - - - - - Abono - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - DataSet1 - 11.32099cm - 0.73766cm - 0.54708cm - 19.56795cm - 6 - - - - - - - - - - - - - - - - - - 7.26042in - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0cm - 0cm - 0cm - 0.13cm - + + + =Parameters!Folio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =UCASE(day(Parameters!Fecha.Value) & " DE " & CHOOSE(MONTH(Parameters!Fecha.Value),"Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre") & " DE " & year(Parameters!Fecha.Value)) + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ImporteLetra.Value + + + + + + + Textbox1 + 3.89629cm + 1.11125cm + 0.6cm + 14.79409cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Beneficiario.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox1 + 2.94428cm + 16.60737cm + 0.75875cm + 3.23497cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.35611cm + + + 11.2824cm + + + 2.29715cm + + + 2.63229cm + + + + + 0.54708cm + + + + + true + true + + + + + =Fields!CODIGO.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cuenta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cargo.Value + + + + + + + Cargo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Abono.Value + + + + + + + Abono + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + DataSet1 + 11.32099cm + 0.73766cm + 0.54708cm + 19.56795cm + 6 + + + + + + + + + + + + + + + + + + 7.26042in + @@ -187,6 +182,7 @@ 1pt Silver + 2pt @@ -238,159 +234,7 @@ 1pt Silver - - - - - - - - true - true - - - - - % de Pago - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - - - - - - - - true - true - - - - - Horas Dobles - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - - - - - - - - true - true - - - - - Horas Triples - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver + 2pt @@ -442,6 +286,59 @@ 1pt Silver + 2pt + + + + + + + + true + true + + + + + Observaciones + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt @@ -449,7 +346,7 @@ - 0.36188cm + 0.5cm @@ -496,6 +393,7 @@ 0.5pt + 2pt @@ -545,6 +443,7 @@ 0.5pt + 2pt @@ -594,134 +493,7 @@ 0.5pt - - - - - - - - true - true - - - - - =Fields!PorcentajePago.Value - - - - - 0.5pt - - - - - - - - - true - true - - - - - =IIf(Fields!HorasDobles.Value>0,Fields!HorasDobles.Value.ToString(),"") - - - - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - - - - - - - true - true - - - - - =IIf(Fields!HorasTriples.Value>0,Fields!HorasTriples.Value.ToString(),"") - - - - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - + 2pt @@ -771,6 +543,57 @@ 0.5pt + 2pt + + + + + + + + true + true + + + + + + + + + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt @@ -786,8 +609,6 @@ - - @@ -803,8 +624,8 @@ DataSet1 3.2953cm 0.31432cm - 0.77667cm - 19.31368cm + 1cm + 19.31369cm diff --git a/GPS/WizardDispositivos.aspx.cs b/GPS/WizardDispositivos.aspx.cs index c85998c46..cfef6afc5 100644 --- a/GPS/WizardDispositivos.aspx.cs +++ b/GPS/WizardDispositivos.aspx.cs @@ -355,11 +355,11 @@ public partial class GPS_WizardDispositivos : ClsPaginas string icono = "rsz_11rsz_car"; string Color = "#0088FF"; string NumTelefono = ChkTipoLinea.Checked ? TxtTelefonoMovil.Text.Trim().Replace("(","").Replace(")","").Replace("-","").Replace(" ","") : "-1"; - if(DdlMarca.SelectedValue =="19" && DevId.Length != 16 ) - { - continuar = false; - Alert("el IMEI y DEVID de los dispositivos concox debe ser igual a 16 dígitos.", ModExtensiones.TipoMensaje.MsgAdvertencia); - } + //if(DdlMarca.SelectedValue =="19" && DevId.Length != 16 ) + //{ + // continuar = false; + // Alert("el IMEI y ID del Dispositivo de los dispositivos concox debe ser igual a 16 dígitos.", ModExtensiones.TipoMensaje.MsgAdvertencia); + //} if (continuar) { ClsGPS ObjGPS = new ClsGPS(); diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index b98e6eb41..a223f1f8c 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -2136,99 +2136,100 @@ Partial Class RH_Personal CargaGvBitacora() If EnviarCorreoNomina AndAlso DDLUsuarioNomina.SelectedValue.ToEntero > 0 Then - EnviarCorreoNominista() + 'EnviarCorreoNominista() + EviarCorreoBajaReingresoNomista(TipoMovimientoRH.Alta) End If End Sub - Private Sub EnviarCorreoNominista() + 'Private Sub EnviarCorreoNominista() - If UsuarioActual.CveEmpresa.Contiene(7) Then + ' If UsuarioActual.CveEmpresa.Contiene(7) Then - Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).Rows(0)("Correo").ToString + ' Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).Rows(0)("Correo").ToString - If CorreoNominista = "" Then - Alert($"No se envio el correo de notificación a nominas, el nominista no tiene {DDLUsuarioNomina.SelectedItem.Text} correo electronico", TipoMensaje.MsgAdvertencia) - Exit Sub + ' If CorreoNominista = "" Then + ' Alert($"No se envio el correo de notificación a nominas, el nominista no tiene {DDLUsuarioNomina.SelectedItem.Text} correo electronico", TipoMensaje.MsgAdvertencia) + ' Exit Sub - End If + ' End If - Dim correo As New ClsSisMail - Dim Cuerpo As New StringBuilder + ' Dim correo As New ClsSisMail + ' Dim Cuerpo As New StringBuilder - Dim Puesto As String = "" - Dim Padre As String = "" - Dim Madre As String = "" - Dim FechaIngreso As String = "" + ' Dim Puesto As String = "" + ' Dim Padre As String = "" + ' Dim Madre As String = "" + ' Dim FechaIngreso As String = "" - Dim EmpresaDestino As String = If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, GlobalDTEmpresas(DdlEmpresaAsignada.SelectedValue.ToEntero).Rows(0)("Empresa").ToString, UsuarioActual.Empresa.Empresa) + ' Dim EmpresaDestino As String = If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, GlobalDTEmpresas(DdlEmpresaAsignada.SelectedValue.ToEntero).Rows(0)("Empresa").ToString, UsuarioActual.Empresa.Empresa) - Dim objRH As New ClsRH + ' Dim objRH As New ClsRH - If objRH.PersonalFamiliaresGet(-1, CvePersonal) Then + ' If objRH.PersonalFamiliaresGet(-1, CvePersonal) Then - Dim DtFamiliares As DataTable = objRH.DtResultados.FiltraParametros(" CveParentesco = 1 ") + ' Dim DtFamiliares As DataTable = objRH.DtResultados.FiltraParametros(" CveParentesco = 1 ") - If DtFamiliares.Rows.Count > 0 Then - Padre = DtFamiliares.Rows(0)("Nombre").ToString - End If + ' If DtFamiliares.Rows.Count > 0 Then + ' Padre = DtFamiliares.Rows(0)("Nombre").ToString + ' End If - DtFamiliares = objRH.DtResultados.FiltraParametros(" CveParentesco = 2 ") + ' DtFamiliares = objRH.DtResultados.FiltraParametros(" CveParentesco = 2 ") - If DtFamiliares.Rows.Count > 0 Then - Madre = DtFamiliares.Rows(0)("Nombre").ToString - End If + ' If DtFamiliares.Rows.Count > 0 Then + ' Madre = DtFamiliares.Rows(0)("Nombre").ToString + ' End If - End If + ' End If - objRH.Dispose() - Cuerpo.AppendLine("") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine("") - Cuerpo.AppendLine("
{ EmpresaDestino }
{ Now.ToShortDateString } { Now.ToShortTimeString }
Notificacion por Alta de Nomina
") + ' objRH.Dispose() + ' Cuerpo.AppendLine("") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine("
{ EmpresaDestino }
{ Now.ToShortDateString } { Now.ToShortTimeString }
Notificacion por Alta de Nomina
") - Cuerpo.AppendLine("
") - Cuerpo.AppendLine("
") + ' Cuerpo.AppendLine("
") + ' Cuerpo.AppendLine("
") - Cuerpo.AppendLine("") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine("
Datos del Candidato
Puesto:{If(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }
Ruta/Servicio:{ If(DdlRuta.SelectedValue.ToEntero > 0, DdlRuta.SelectedItem.Text, "") }
Fecha de ingreso:{TxtFechaIngreso.Text}
Nombre:{ NombreCompleto }
Fecha y Lugar de Nacimiento:{TxtFechaNacimiento.Text} {TxtLugarNacimiento.Text}
Numero IMSS:{ TxtNumeroSS.Text }
Numero Infonavit:{ If(TxtInfoNumCredito.Text.Trim = "", "NO CUENTA CON CREDITO", TxtInfoNumCredito.Text) }
Sexo:{ If(DdlGenero.SelectedValue = "1", "Masculino", "Femenino") }
R.F.C.:{ TxtRFC.Text }
CURP:{ TxtCURP.Text }
") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") - If Padre.Length > 0 Then - Cuerpo.AppendLine($"") - End If + ' If Padre.Length > 0 Then + ' Cuerpo.AppendLine($"") + ' End If - If Madre.Length > 0 Then - Cuerpo.AppendLine($"") - End If + ' If Madre.Length > 0 Then + ' Cuerpo.AppendLine($"") + ' End If - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine("
Datos del Candidato
Puesto:{If(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }
Ruta/Servicio:{ If(DdlRuta.SelectedValue.ToEntero > 0, DdlRuta.SelectedItem.Text, "") }
Fecha de ingreso:{TxtFechaIngreso.Text}
Nombre:{ NombreCompleto }
Fecha y Lugar de Nacimiento:{TxtFechaNacimiento.Text} {TxtLugarNacimiento.Text}
Numero IMSS:{ TxtNumeroSS.Text }
Numero Infonavit:{ If(TxtInfoNumCredito.Text.Trim = "", "NO CUENTA CON CREDITO", TxtInfoNumCredito.Text) }
Sexo:{ If(DdlGenero.SelectedValue = "1", "Masculino", "Femenino") }
R.F.C.:{ TxtRFC.Text }
CURP:{ TxtCURP.Text }
Nombre del Padre:{ Padre }
Nombre del Padre:{ Padre }
Nombre de la Madre:{ Madre }
Nombre de la Madre:{ Madre }
Dirección:{ TxtCalle.Text }
Escolaridad:{ If(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }
Telefono:{ TxtCelular.Text},{TxtTelefono.Text}
Correo:{ TxtCorreo.Text }
") + ' Cuerpo.AppendLine($"Dirección:{ TxtCalle.Text }") + ' Cuerpo.AppendLine($"Escolaridad:{ If(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }") + ' Cuerpo.AppendLine($"Telefono:{ TxtCelular.Text},{TxtTelefono.Text}") + ' Cuerpo.AppendLine($"Correo:{ TxtCorreo.Text }") + ' Cuerpo.AppendLine("") - correo.SendMail(EmpresaNotificaciones, CorreoNominista, "Notificacion por Alta de Nomina: " & NombreCompleto, Cuerpo.ToString) + ' correo.SendMail(EmpresaNotificaciones, CorreoNominista, "Notificacion por Alta de Nomina: " & NombreCompleto, Cuerpo.ToString) - End If + ' End If - End Sub + 'End Sub 'Private Sub MandaMails(Rutas As Object) ' Try @@ -7505,6 +7506,12 @@ Partial Class RH_Personal End Using End If + If continuar Then + + EviarCorreoBajaReingresoNomista(If(estatus = 1, TipoMovimientoRH.Reingreso, TipoMovimientoRH.Baja)) + + End If + If continuar Then RegistraScript("$('#ModalUpEstatus').modal('hide');") @@ -7647,5 +7654,115 @@ Partial Class RH_Personal End Sub + + +#Region "ENVIAR CORREO NOMINISTA" + + Enum TipoMovimientoRH + Alta + Baja + Reingreso + End Enum + + Private Sub EviarCorreoBajaReingresoNomista(eTipoMovimientoRH As TipoMovimientoRH) + + + Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).FiltroPrimeroValor("Correo") + Dim correo As New ClsSisMail + Dim Cuerpo As New StringBuilder + + Dim CorreoUsuario As String = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo") + Dim CCP As String = If(CorreoUsuario.Trim.Length > 0, CorreoUsuario, "") + + If CorreoNominista = "" Then + Alert("No se envio el correo de notificación a nominas, el nominista no tiene correo electronico", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim Puesto As String = "" + Dim Padre As String = "" + Dim Madre As String = "" + Dim FechaIngreso As String = "" + + Dim objRH As New ClsRH + + If objRH.PersonalFamiliaresGet(-1, CvePersonal) Then + + Dim DtFamiliares As DataTable = objRH.DtResultados.FiltraParametros(" CveParentesco = 1 ") + + If DtFamiliares.Rows.Count > 0 Then + Padre = DtFamiliares.Rows(0)("Nombre").ToString + End If + + DtFamiliares = objRH.DtResultados.FiltraParametros(" CveParentesco = 2 ") + + If DtFamiliares.Rows.Count > 0 Then + Madre = DtFamiliares.Rows(0)("Nombre").ToString + End If + + End If + + Dim TimpoMovimiento As String = "" + + Select Case eTipoMovimientoRH + Case TipoMovimientoRH.Alta + TimpoMovimiento = "Alta" + Exit Select + Case TipoMovimientoRH.Baja + TimpoMovimiento = "Baja" + Exit Select + Case TipoMovimientoRH.Reingreso + TimpoMovimiento = "Reingreso" + Exit Select + End Select + + objRH.Dispose() + Cuerpo.AppendLine("") + Cuerpo.AppendLine($"") + + Cuerpo.AppendLine($"") + Cuerpo.AppendLine("
{ UsuarioActual.Empresa.Empresa }
{ Now.ToShortDateString } { Now.ToShortTimeString }
Notificacion por { TimpoMovimiento } de Nomina
") + + Cuerpo.AppendLine("
") + Cuerpo.AppendLine("
") + + Cuerpo.AppendLine("") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + + Cuerpo.AppendLine($"") + + If eTipoMovimientoRH = TipoMovimientoRH.Baja Then + Cuerpo.AppendLine($"") + If Txobservacionesbaja.Text.Trim.Length > 0 Then + Cuerpo.AppendLine($"") + End If + End If + + + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine("
Datos del Candidato
Puesto:{IIf(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }
Ruta/Servicio:{ DdlRuta.SelectedItem.Text }
Fecha de { TimpoMovimiento }:{TxtFechaEstatus.Text}
Motivo de Baja:{ DdlMotivoBaja.SelectedItem.Text }
Observaciones :{ Txobservacionesbaja.Text.Trim }
Nombre:{ NombreCompleto }
Fecha y Lugar de Nacimiento:{TxtFechaNacimiento.Text} {TxtLugarNacimiento.Text}
Numero IMSS:{ TxtNumeroSS.Text }
Numero Infonavit:{ If(TxtInfoNumCredito.Text.Trim = "", "NO CUENTA CON CREDITO", TxtInfoNumCredito.Text) }
Sexo:{ IIf(DdlGenero.SelectedValue = "1", "Masculino", "Femenino") }
R.F.C.:{ TxtRFC.Text }
CURP:{ TxtCURP.Text }
Nombre del Padre:{ Padre }
Nombre de la Madre:{ Madre }
Dirección:{ TxtCalle.Text } No Ext.{ TxtNumExt.Text} No int.{TxtNumInt.Text}
Escolaridad:{ IIf(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }
Telefono:{ TxtCelular.Text},{TxtCelularPersonal.Text}
Tel en Caso de Emergencia:{ TxtTelefonoEmergencia.Text }
Correo:{ TxtCorreo.Text }
") + + correo.SendMail(EmpresaNotificaciones, CorreoNominista, $"Notificacion por { TimpoMovimiento }de Nomina: " & NombreCompleto, Cuerpo.ToString, CCP:=CCP) + + End Sub + + +#End Region + End Class diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 386a974d3..e706f9aca 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1044,9 +1044,6 @@ Partial Class Clientes #Region "C A R G A S" - - - Private Sub CreaDtPago() DtPagos = New DataTable DtPagos.Columns.Add("CveTipoMovimiento", GetType(String)) @@ -1194,10 +1191,6 @@ Partial Class Clientes DdlCtaContableAnticipos.Attributes.Add("onclick", "CargaCuentas(2);") End If - 'DdlCtaContableRetIVA.Attributes.Add("onclick", "CargaCuentas(3);") - 'DdlCtaContableRetISR.Attributes.Add("onclick", "CargaCuentas(4);") - 'DdlCtaContableFondoGarantia.Attributes.Add("onclick", "CargaCuentas(5);") - If UsuarioActual.Empresa.Funcionalidad(248).ToEntero() > 0 Then DdlCtaContableCompClientes.Attributes.Add("onclick", "CargaCuentas(6);") End If @@ -1244,47 +1237,8 @@ Partial Class Clientes End Select UpFiscalContable.Update() - ' Las funcionalidades 246, 247 y 248 para DdlCtaContableClientes, DdlMonedaExtranjeraClientes y DdlCtaContableCompClientes tienen prioridad sobre las demas. - 'If UsuarioActual.Empresa.UsaContabilidad Then CargaCuentasContablesClientes() - - End Sub - 'Private Sub CargaCuentasContablesClientes() - ' If UsuarioActual.Empresa.ServerContPAQi = "" Then Exit Sub - ' ' Verifica si la empresas tienen las funcionalidades 246, 247 y 248 - ' Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) - - ' If UsuarioActual.Empresa.Funcionalidad(246).Toentero() > 0 Then - ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(246).Toentero(), "-1", 1) Then - ' DdlCtaContableClientes.Items.Clear() - ' DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados - ' DdlCtaContableClientes.DataBind() - ' End If - ' End If - - ' If UsuarioActual.Empresa.Funcionalidad(247).Toentero() > 0 Then - ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(247).Toentero(), "-1", 1) Then - ' DdlMonedaExtranjeraClientes.Items.Clear() - ' DdlMonedaExtranjeraClientes.Items.Add(New ListItem("Seleccione", "0")) - ' DdlMonedaExtranjeraClientes.DataSource = ObjContabilidad.DtResultados - ' DdlMonedaExtranjeraClientes.DataBind() - ' End If - ' End If - - ' If UsuarioActual.Empresa.Funcionalidad(248).Toentero() > 0 Then - ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(248).Toentero(), "-1", 1) Then - ' DdlCtaContableCompClientes.Items.Clear() - ' DdlCtaContableCompClientes.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCtaContableCompClientes.DataSource = ObjContabilidad.DtResultados - ' DdlCtaContableCompClientes.DataBind() - ' End If - ' End If - - ' ObjContabilidad.Dispose() - - 'End Sub Private Sub CargaDdlCuentasContables(Ddl As DropDownList, Optional CveFuncionalidad As Integer = -1) Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) If ObjContabilidad.GetCuentasRecursiva(CveFuncionalidad, 1) Then @@ -1506,23 +1460,13 @@ Partial Class Clientes Dim RetSC As Boolean = CargaSucursalesCliente() CargaUsuariosPortal() - 'CargaPersonalAsignado() - 'CargaOrdenesServiciosCliente() CargaImpuestosLocales() CargaCuentasContablesDdls() CargaResponsables() CargaCondicionesEntrega() - 'CargaClasificaciones() - ' CargaGridRetenciones() - ' CargaDocs() CargaCombos() CargaDocumentacionCliente() CargaSubProyectosSuscursales() - 'CargaMetodosPago33() - 'CargaFormaPago33() - 'CargaComboCFDI() - 'CargarPagosNoBancarios() - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then @@ -1774,12 +1718,6 @@ Partial Class Clientes DdlAdminTrayecto.SelectedValueExist(ObjClientes.DtResultados(0)("CveAdminTrayecto").ToString()) DdlAdminTrayecto_SelectedIndexChanged(DdlAdminTrayecto, EventArgs.Empty) - 'If ObjClientes.CveUsoCFDI > 0 Then DdlUsoCFDI.Items.RemoveAt(0) - 'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0) - 'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0) - - - 'DIAS DE PAGO If ObjClientes.RecepcionPagos <> "" AndAlso ObjClientes.RecepcionPagos.Length = 11 Then @@ -1806,15 +1744,7 @@ Partial Class Clientes 'Horario TxtHorario.Text = ObjClientes.Horario - 'If ObjClientes.Horario <> "" Then - ' Dim arrayHorario As String() = ObjClientes.Horario.Split(New Char() {"|"c}) - ' If arrayHorario.Count = 1 Then - ' TxtHorario1.Text = arrayHorario(0) - ' End If - ' If arrayHorario.Count = 2 Then - ' TxtHorario2.Text = arrayHorario(1) - ' End If - 'End If + TxtObsDiasRevision.Text = ObjClientes.ObservacionRevision TxtReferenciaFiscal.Text = ObjClientes.ReferenciaFiscal @@ -1872,24 +1802,7 @@ Partial Class Clientes Alert("El cliente actualmente se encuentra Inactivo.", TipoMensaje.MsgAdvertencia) End If - 'watch.Stop() - 'Alert(watch.ElapsedMilliseconds.ToString()) - 'watch.Start() - - CargaEventoBitacora() - 'If UsuarioActual.Empresa.Funcionalidad(300) = "1" Then - ' CargaCuentasConceptos() - ' divCuentas.Visible = True - ' divCuentasContp.Visible = False - 'Else - ' divCuentas.Visible = False - ' divCuentasContp.Visible = True - 'End If - - 'watch.Stop() - 'Alert(watch.ElapsedMilliseconds.ToString()) - 'watch.Start() If UsuarioActual.Empresa.TipoContabilidad = 1 Then CargaCuentasConceptos()