From: Owen Leonard Date: Sun, 12 Sep 2010 22:10:59 +0000 (-0600) Subject: fix some filtering of visit data like families to visit so they only list the ones... X-Git-Tag: release_1_0_0~50 X-Git-Url: http://git.pippins.net/embedvideo/images/%27%20%20%20%20.%20%24GLOBALS%5B%27phpgw%27%5D-%3Elink%28%27inc/jquery/static/x.gif?a=commitdiff_plain;h=c0dbf61b4fc7c2dbcf86940657ac5cd68c191679;p=eq%2F.git 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. --- 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;