diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 4556220f6..fbf0a6182 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5852,6 +5852,71 @@ Public Class ClsContabilidad Return Retorno End Function +#Region "Globales" + Public Function GetCuentasGlobales(CveEmpresa As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Conta_CuentasGlobalesGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener el catálogo de cuentas globales", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function AddCuentasGlobales(CveConceptoContable As Integer, CveCuenta As Integer, TipoGlobal As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Conta_CuentasGlobalesAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable + .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + .Add("@TipoGlobal", SqlDbType.Int).Value = TipoGlobal + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar el catálogo de cuentas asignación", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function RemoveCuentasGlobales(CveConceptoContable As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Conta_CuentasGlobalesDelete") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar el catálogo de globales", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + +#End Region + Public Function GetContaEjercicio(CveEmpresa As Integer) As Boolean Dim Retorno = False diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index c867464e4..7c27793f3 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -1084,12 +1084,14 @@ Public Class ClsContratos End Function - Public Function GetContratosDetalle(CveContrato As Integer) As Boolean + Public Function GetContratosDetalle(CveContrato As Integer, CveEmpresa As Integer, Optional Grupo As Integer = 1) As Boolean Dim Retorno = False DataAdapter("PA_Con_ContratosDetalleGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Grupo", SqlDbType.Int).Value = Grupo End With Try diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 4f74331ac..576b25214 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -1961,7 +1961,7 @@ Public Class E141 : Implements IHttpHandler End If End If - Threading.Thread.Sleep(3000) + Threading.Thread.Sleep(1000) End While End If @@ -2219,8 +2219,7 @@ Public Class E141 : Implements IHttpHandler CountPeticionesExitosas += 1 End If End If - - Threading.Thread.Sleep(3000) + Threading.Thread.Sleep(1000) End While End If End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 28a827454..f65919d08 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4281,10 +4281,12 @@ Partial Class Compras_Compras Next If ErrorValidacion Then Exit Sub - Dim dtPSInvalidos As String = ValidarPSContrato(TmpDT.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"})) - If dtPSInvalidos <> "" Then - Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) - Exit Sub + If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then + Dim dtPSInvalidos As String = ValidarPSContrato(TmpDT.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"})) + If dtPSInvalidos <> "" Then + Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) + Exit Sub + End If End If 'RECORRO LOS PRODUCTOS O SERVICIOS PARA REGISTRARLOS LOS QUE NO EXISTEN EN EL CATÁLOGO @@ -18106,25 +18108,31 @@ Partial Class Compras_Compras End If ActualizaTotales = True - Dim ObjContratos As New ClsContratos - Dim TieneError As Boolean = False - Dim dttemp As New DataTable ' GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString)) - dttemp.Columns.Add("CveSubProyecto", GetType(Integer)) - dttemp.Columns.Add("CvePS", GetType(Integer)) - dttemp.Columns.Add("Cantidad", GetType(Decimal)) - dttemp.Columns.Add("PU", GetType(Decimal)) - Dim DrPS = dttemp.NewRow - DrPS("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero - DrPS("CvePS") = DdlPS.SelectedValue.ToString.ToEntero - DrPS("Cantidad") = TxtCantidad.Text.Trim.ToDecimal - DrPS("PU") = TxtPrecio.Text.Trim.ToDecimal - dttemp.Rows.Add(DrPS) + If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then + Dim TieneError As Boolean = False + Dim dttemp As New DataTable '= GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString)) + dttemp.Columns.Add("CveSubProyecto", GetType(Integer)) + dttemp.Columns.Add("CvePS", GetType(Integer)) + dttemp.Columns.Add("Cantidad", GetType(Decimal)) + dttemp.Columns.Add("PU", GetType(Decimal)) - Dim dtPSInvalidos As String = ValidarPSContrato(dttemp) - If dtPSInvalidos <> "" Then - TieneError = True + Dim DrPS = dttemp.NewRow + DrPS("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero + DrPS("CvePS") = DdlPS.SelectedValue.ToString.ToEntero + DrPS("Cantidad") = TxtCantidad.Text.Trim.ToDecimal + DrPS("PU") = TxtPrecio.Text.Trim.ToDecimal + dttemp.Rows.Add(DrPS) + + Dim dtPSInvalidos As String = ValidarPSContrato(dttemp) + If dtPSInvalidos <> "" Then + TieneError = True + Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) + Exit Sub + End If End If + + 'If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then ' Dim drContrato As DataRow = dttemp.Rows(0) ' If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero) Then @@ -18157,75 +18165,52 @@ Partial Class Compras_Compras ' End If 'End If - ObjContratos.Dispose() - If Not TieneError Then - Select Case Modalidad - Case "A" 'ADD - Dim SATClavePS = -1 - Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") - If PSRow IsNot Nothing Then - SATClavePS = PSRow("SATClavePS").ToString.ToEntero - End If - Dim IVA As Double - If chkImportacion.Checked Then - IVA = (txtImportacion.Text.Trim.ToDouble / (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.Trim.ToDouble)) - Else - IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2) - End If - AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero, + + + Select Case Modalidad + Case "A" 'ADD + + Dim SATClavePS = -1 + Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") + If PSRow IsNot Nothing Then + SATClavePS = PSRow("SATClavePS").ToString.ToEntero + End If + Dim IVA As Double + If chkImportacion.Checked Then + IVA = (txtImportacion.Text.Trim.ToDouble / (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.Trim.ToDouble)) + Else + IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2) + End If + AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero, DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA, TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text, NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS) - AddPS2() - LimpiaAgregar() + AddPS2() + LimpiaAgregar() - If ChkAgregar.Checked = True And Modalidad = "A" Then - RegistraScript("displayToastr(1);", "display") - Else - RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto")) - End If - - Case "U" 'UPDATE - UpdatePS() - Alert("Concepto actualizado Correctamente.", TipoMensaje.MsgInformacion) - RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto")) - End Select - ActualizaTotales = False - - If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero) - - If UsuarioActual.Empresa.UsaAC Then - CompruebaAgregar() - GuardaAC() - End If + If ChkAgregar.Checked = True And Modalidad = "A" Then + RegistraScript("displayToastr(1);", "display") Else - Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) + RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto")) End If + Case "U" 'UPDATE + UpdatePS() + Alert("Concepto actualizado Correctamente.", TipoMensaje.MsgInformacion) + RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto")) + End Select + ActualizaTotales = False - 'If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then + If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero) - ' 'If UsuarioActual.CveRol = 1 Then - ' ' Alert($"Ok funcionalidad 577 RetencionIVA { RetencionIVA} IVAOriginal {IVAOriginal}") - ' 'End If + If UsuarioActual.Empresa.UsaAC Then + CompruebaAgregar() + GuardaAC() + End If - ' If RetencionIVA = 0 And IVAOriginal > 0 Then - ' For Each dRow As DataRow In TmpDT.Rows - ' If dRow("CveTipoPS").ToString.ToEntero = 1 Then - ' 'Comnetado para reubicar el boton - ' 'tdIVA6.Visible = True - ' Exit For - ' End If - ' Next - ' End If - - 'End If - - - - UpPS.Update() + UpPS.Update() CargaGvPersonal() End Sub ''' @@ -20938,6 +20923,7 @@ Partial Class Compras_Compras Next End If End If + objContratos.Dispose() If MensajeProducto.Length <> 64 Then Retorno = MensajeProducto diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx index e518412a9..ea32e31b3 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx +++ b/Contabilidad2/CatCuentasAsignaciones.aspx @@ -14,7 +14,10 @@
  • - + +
  • +
  • +
  • @@ -86,6 +89,27 @@ +
    + + + + + + + + + + + + + + + + + +
    @@ -171,6 +195,53 @@ + + + + + + + diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index 2dcb413aa..526852767 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -40,8 +40,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero, DdlOpcion.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjConta.DtResultados End If + + If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then + GvGlobal.DataSource = ObjConta.DtResultados + End If + ObjConta.Dispose() GvDatos.DataBind() + GvGlobal.DataBind() UpDatos.Update() End Sub @@ -53,10 +59,12 @@ Partial Class Contabilidad2_CatCuentasAsignaciones If ObjConta.GetConta_ConceptosContables() Then DdlCconceptosContables.DataSource = ObjConta.DtResultados + DdlConceptoGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("EsCuentaUnica = false AND EsSistema = True AND EsGlobal = True") End If If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then DdlCuenta.DataSource = ObjConta.DtResultados + DdlCuentaGlobal.DataSource = ObjConta.DtResultados End If ObjConta.Dispose() DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) @@ -79,7 +87,9 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlCuentaBancaria.DataBind() DdlCconceptosContables.DataBind() + DdlConceptoGlobal.DataBind() DdlCuenta.DataBind() + DdlCuentaGlobal.DataBind() DdlProveedor.DataBind() 'DdlPersonal.DataBind() DdlClasificacion.DataBind() @@ -145,6 +155,11 @@ Partial Class Contabilidad2_CatCuentasAsignaciones End If End If + If Dr("AplicaImpuesto").ToString = "True" Then + divPorcentajeIVA.Visible = True + End If + + If Dr("AplicaClasificacion").ToString = "True" Then divClasificacion.Visible = True End If @@ -184,7 +199,24 @@ Partial Class Contabilidad2_CatCuentasAsignaciones ObjConta.Dispose() End Sub - Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click + Protected Sub BtnAgregarGlobal_Click(sender As Object, e As EventArgs) Handles BtnAgregarGlobal.Click + + UppModalGlobal.Update() + RegistraScript("$('#ModalGlobal').modal();") + End Sub + + Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim ObjConta As New ClsContabilidad + If ObjConta.RemoveCuentasGlobales(GvRow.DataKey("CveConceptoContable").ToEntero, GvRow.DataKey("CveEmpresa").ToEntero) Then + Alert("se elimino correctamente") + End If + CargaDatosSistema() + UpDatos.Update() + ObjConta.Dispose() + End Sub + + Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click LimpiarDatos() LbAgregar.Text = "Agregar" @@ -238,4 +270,22 @@ Partial Class Contabilidad2_CatCuentasAsignaciones CargaDatosSistema() UpDatos.Update() End Sub + + Protected Sub LBAgregaGlobal_Click(sender As Object, e As EventArgs) + + Dim ErrorString As String = "" + Dim ObjConta As New ClsContabilidad + If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + ErrorString = "Error al agregar" + End If + ObjConta.Dispose() + + If ErrorString.Length > 0 Then + Alert(ErrorString) + Else + Alert("Agregado correctamente") + End If + CargaDatosSistema() + UpDatos.Update() + End Sub End Class diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index b5bcf8cf4..31f16c46a 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -1182,7 +1182,7 @@ Partial Class Contratos_Default If TipoContrato = 4 Then TabPI.Visible = True End If - If ObjContratos.GetContratosDetalle(CveContrato) Then + If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then TmpDT = ObjContratos.DtResultados If TmpDT.MAX("Cantidad_Original").ToString.ToEntero > 0 OrElse TmpDT.MAX("PU_Original").ToString.ToEntero > 0 Then BtnAutorizar.Visible = False diff --git a/Contratos/Contrato.vb b/Contratos/Contrato.vb index 546200e3f..7972d98d8 100644 --- a/Contratos/Contrato.vb +++ b/Contratos/Contrato.vb @@ -529,7 +529,7 @@ Partial Class Contratos_Default If TipoContrato = 4 Then TabPI.Visible = True End If - If ObjContratos.GetContratosDetalle(CveContrato) Then + If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then TmpDT = ObjContratos.DtResultados If TmpDT.MAX("Cantidad_Original").ToString.ToEntero > 0 OrElse TmpDT.MAX("PU_Original").ToString.ToEntero > 0 Then BtnAutorizar.Visible = False diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 8d67cbbde..368397521 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -902,7 +902,7 @@ Partial Class Contratos_ContratoObra If TipoContrato = 4 Then TabPI.Visible = True End If - If ObjContratos.GetContratosDetalle(CveContrato) Then + If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then TmpDT = ObjContratos.DtResultados If TmpDT.MAX("Cantidad_Original").ToString.ToEntero > 0 OrElse TmpDT.MAX("PU_Original").ToString.ToEntero > 0 Then BtnAutorizar.Visible = False diff --git a/Contratos/FacturacionMasiva.aspx.vb b/Contratos/FacturacionMasiva.aspx.vb index e7f136f5d..01c6fc60e 100644 --- a/Contratos/FacturacionMasiva.aspx.vb +++ b/Contratos/FacturacionMasiva.aspx.vb @@ -467,7 +467,7 @@ Partial Class Contratos_FacturacionMasiva SubProyecto = DR("SubProyectoContrato").ToString Dim objContratos As New ClsContratos - If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then + If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then DTDetalle = objContratos.DtResultados.FiltraParametros("CveTipoPresupuesto=2") Else DTDetalle = Nothing diff --git a/GPS/FacturacionMasiva.aspx.vb b/GPS/FacturacionMasiva.aspx.vb index c5ac0022e..5fcd2b16c 100644 --- a/GPS/FacturacionMasiva.aspx.vb +++ b/GPS/FacturacionMasiva.aspx.vb @@ -548,7 +548,7 @@ Partial Class Contratos_FacturacionMasiva End If ObjFolios.Dispose() - If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then + If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then DTDetalle = objContratos.DtResultados Else DTDetalle = Nothing diff --git a/GPS/RepIgnicion.aspx b/GPS/RepIgnicion.aspx index 39b17bfa0..ef1abbef3 100644 --- a/GPS/RepIgnicion.aspx +++ b/GPS/RepIgnicion.aspx @@ -1,126 +1,139 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepIgnicion.aspx.cs" Inherits="GPS_RepIgnicion" %> - - - - - - - Reporte de Ignición - - - - -
  • - - - Imprimir PDF - - - - - -
  • -
    - - - - - -
    -
    -
    - -
    -
    -
      +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepIgnicion.aspx.cs" Inherits="GPS_RepIgnicion" %> + + + + + + + Reporte de Ignición + + + + +
    • + + + Imprimir PDF + + + + + +
    • +
    • + + + Imprimir EXCEL + + + + + +
    • +
      + + + + + +
      +
      +
      + +
      +
      +
      • Vehículo: - - - - - -
      • + + + + + + +
      • Fecha Inicio: -
        - - - -
        -
      • + +
        + + + +
        +
      • Fecha Fin: -
        - - - -
        -
      • -
      -
      -
      -
      -
      -
      - - -
      -
      -
      - - Igniciones -
      -
      -
      -
      -
      -
      - -
      -
      -
      - - - - - - - - - - - - - - - - - - - - - -
      -
      -
      -
      - -
      - - - + +
      + + + +
      + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + Igniciones +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    + + + diff --git a/GPS/RepIgnicion.aspx.cs b/GPS/RepIgnicion.aspx.cs index d22b84c96..080c37105 100644 --- a/GPS/RepIgnicion.aspx.cs +++ b/GPS/RepIgnicion.aspx.cs @@ -58,7 +58,8 @@ public partial class GPS_RepIgnicion : ClsPaginas DtIgniciones = ObjGPS.DtResultados; GvIgnicion.DataSource = DtIgniciones; GvIgnicion.DataBind(); - LnkImprimirPDF.Visible = true; + LnkImprimirPDF.Visible = true; + LnkImprimirEXCEL.Visible = true; } } UpDatos.Update(); @@ -104,14 +105,18 @@ public partial class GPS_RepIgnicion : ClsPaginas protected void LnkImprimirPDF_Click(object sender, EventArgs e) { - EnviarReporteProgramado(); + EnviarReporteProgramado("PDF"); + } + protected void LnkImprimirEXCEL_Click(object sender, EventArgs e) + { + EnviarReporteProgramado("EXCEL"); } - public void EnviarReporteProgramado() + public void EnviarReporteProgramado(string Formato = "PDF") { if (DtIgniciones != null) { byte[] retorno; - string RutaReporte = "Empresas/Grales/ReportesProgramados/RPIgnicion.rdlc"; + string RutaReporte = ModExtensiones.DirectorioBaseEmpresas + "Empresas/Grales/ReportesProgramados/RPIgnicion.rdlc"; try { @@ -121,10 +126,10 @@ public partial class GPS_RepIgnicion : ClsPaginas RptParametro.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)); RptParametro.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy HH:mm tt"))); - retorno = StreamPDF(RutaReporte, DtIgniciones, RptParametro, "ReporteEventos", "PDF", "DsOC"); + retorno = StreamPDF(RutaReporte, DtIgniciones, RptParametro, "ReporteEventos", Formato, "DsOC"); // TODO: Labeled Arguments not supported. Argument: 6 := 'MR' // TODO: Labeled Arguments not supported. Argument: 7 := 'RDSName' - ImprimirbytesPDF(retorno, "ReporteEventos"); + ImprimirbytesPDF(retorno, "ReporteEventos", Formato: Formato); } catch (Exception ex) { diff --git a/Inventarios/InventarioFisico.aspx b/Inventarios/InventarioFisico.aspx index 1a5d3f0a6..c0ce7e46a 100644 --- a/Inventarios/InventarioFisico.aspx +++ b/Inventarios/InventarioFisico.aspx @@ -89,8 +89,11 @@ - + + + + + diff --git a/Inventarios/InventarioFisico.aspx.vb b/Inventarios/InventarioFisico.aspx.vb index 562b84cc2..01a569f52 100644 --- a/Inventarios/InventarioFisico.aspx.vb +++ b/Inventarios/InventarioFisico.aspx.vb @@ -759,6 +759,10 @@ Partial Class Inventarios_InventarioFisico If e.Row.DBCampo("CveEstatus") = "3" Then e.Row.FCLinkButton("imgE").Visible = False e.Row.FCLinkButton("imgD").Visible = False + ElseIf e.Row.DBCampo("CveEstatus") = "1" Then ' cuando es en proceso + e.Row.FCHyperLink("HplDif").NavigateUrl = String.Format("/Inventarios/RepAnomalias.aspx?CveInventarioFisico={0}&EsAvance=1", e.Row.DBCampo("CveInventarioFisico")) + ElseIf e.Row.DBCampo("CveEstatus") = "0" Then ' Nuevo + e.Row.FCHyperLink("HplDif").Visible = False End If End If diff --git a/Inventarios/RepAnomalias.aspx b/Inventarios/RepAnomalias.aspx index ef815c938..1b930ed61 100644 --- a/Inventarios/RepAnomalias.aspx +++ b/Inventarios/RepAnomalias.aspx @@ -207,22 +207,23 @@
    -
    -
    - -
    -
    - Número de registros: -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    -
    -
    + +
    +
    + +
    +
    + Número de registros: +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    +
    +
    @@ -256,22 +257,23 @@

    -
    -
    - -
    -
    - Número de registros: -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    -
    -
    + +
    +
    + +
    +
    + Número de registros: +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    +
    +
    diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb index 3fd260b3e..2fb44a88f 100644 --- a/Inventarios/TrasladoSolicitud.aspx.vb +++ b/Inventarios/TrasladoSolicitud.aspx.vb @@ -547,7 +547,7 @@ Partial Class Inventarios_TrasladoSolicitud End Sub Private Sub DdlContratos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlContratos.SelectedIndexChanged Dim ObjContratos As New ClsContratos - If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then + If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GvContratos.DataSource = ObjContratos.DtResultados GvContratos.DataBind() If ObjContratos.DtResultados.Rows.Count > 0 Then @@ -974,7 +974,7 @@ Partial Class Inventarios_TrasladoSolicitud Dim DTContratosTemporal As New DataTable Dim ObjContratos As New ClsContratos - If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then + If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then DTContratosTemporal = ObjContratos.DtResultados End If ObjContratos.Dispose() diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 063f42c4b..dae0fd7d6 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -7435,7 +7435,7 @@ Partial Class OC Private Sub CargaContratos() Dim ObjContratos As New ClsContratos - If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then + If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GvContratos.DataSource = ObjContratos.DtResultados End If ObjContratos.Dispose() @@ -7465,7 +7465,7 @@ Partial Class OC Private Sub DdlContratos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlContratos.SelectedIndexChanged Dim ObjContratos As New ClsContratos - If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then + If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GvContratos.DataSource = ObjContratos.DtResultados GvContratos.DataBind() End If diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index fc06bd5a1..a36f25ad3 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -1571,6 +1571,7 @@