From c0dbf61b4fc7c2dbcf86940657ac5cd68c191679 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sun, 12 Sep 2010 16:10:59 -0600 Subject: [PATCH] fix some filtering of visit data like families to visit so they only list the ones under the stewardship of the quorum (ones that have home teachers assigned) fixed some ordering of the lists so that they are more alphabetic and therefore easier to scan. --- inc/class.tc.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/class.tc.inc.php b/inc/class.tc.inc.php index 93d8aed..2a73109 100644 --- a/inc/class.tc.inc.php +++ b/inc/class.tc.inc.php @@ -1540,7 +1540,7 @@ class tc // PPI SCHEDULING TABLE // TODO: changed this so it picks the quorum dynamically - $sql = "SELECT * FROM tc_indiv where valid=1 and steward='Elder' ORDER BY ppi_pri ASC"; + $sql = "SELECT * FROM tc_indiv where valid=1 and steward='Elder' ORDER BY ppi_pri ASC, name ASC"; $this->db->query($sql,__LINE__,__FILE__); $i=0; @@ -2085,7 +2085,7 @@ class tc $year = date('Y'); // create the family id -> family name mapping - $sql = "SELECT * FROM tc_family where valid=1 and indiv_id != 0 ORDER BY name ASC"; + $sql = "SELECT * FROM tc_family where valid=1 and indiv_id != 0 and companionship != 0 ORDER BY name ASC"; $this->db->query($sql,__LINE__,__FILE__); $i=0; $family_id = NULL; @@ -2229,7 +2229,7 @@ class tc // VISIT SCHEDULING TABLE - $sql = "SELECT * FROM tc_family where valid=1 and indiv_id != 0 ORDER BY visit_pri ASC"; + $sql = "SELECT * FROM tc_family where valid=1 and indiv_id != 0 and companionship != 0 ORDER BY visit_pri ASC, name ASC"; $this->db->query($sql,__LINE__,__FILE__); $total_families=0; $families_with_yearly_visit=0; -- 2.34.1