diff --git a/relatorios/ura/uraDesempenho.php b/relatorios/ura/uraDesempenho.php index d4c9127..5800614 100644 --- a/relatorios/ura/uraDesempenho.php +++ b/relatorios/ura/uraDesempenho.php @@ -486,8 +486,9 @@ FROM pbx_ura_movimento WHERE umv_data >= '%s' AND umv_data <= '%s' AND umv_ura_opcao IS NOT NULL - AND umv_tipo = 'opc'", FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim)); - + AND umv_tipo = 'opc' + ORDER BY umv_ura_nome", FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim)); + $resp = pg_query($dbcon, $query); $result = pg_fetch_all($resp); diff --git a/relatorios/ura/uraGeral.php b/relatorios/ura/uraGeral.php index 41e6883..9163c64 100644 --- a/relatorios/ura/uraGeral.php +++ b/relatorios/ura/uraGeral.php @@ -363,7 +363,8 @@ $query = sprintf("SELECT DISTINCT umv_ura_nome, umv_ura_id FROM pbx_ura_movimento WHERE umv_data >= '%s' AND umv_data <= '%s' - AND umv_tipo = 'ini' ", FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim)); + AND umv_tipo = 'ini' + ORDER BY umv_ura_nome ", FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim)); $resp = pg_query($dbcon, $query); $result = pg_fetch_all($resp);