X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;ds=inline;f=inc%2Fclass.eq.inc.php;h=c253f155115a126268b03461fd0368a63e9ebf46;hb=2b7d846ca87b79a639063ee7252992c91f2cef4b;hp=7b40acb47df95d452f790b248b854f93e7b5b69b;hpb=91304044f2ea32e703e55e2d16b1cb3e7c113829;p=eq%2F.git
diff --git a/inc/class.eq.inc.php b/inc/class.eq.inc.php
index 7b40acb..c253f15 100644
--- a/inc/class.eq.inc.php
+++ b/inc/class.eq.inc.php
@@ -872,13 +872,14 @@ class eq
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/eq/index.php','menuaction=eq.eq.ppi_sched&action=save'));
$this->t->set_var('title','EQ President Yearly PPIs Scheduler');
- $elder_width=450; $phone_width=25; $pri_width=10; $notes_width=128;
- $table_width=$elder_width + $phone_width + $pri_width + $notes_width;
+ $elder_width=500; $phone_width=25; $pri_width=10; $notes_width=128; $ppi_date_width=20;
+ $table_width=$elder_width + $phone_width + $pri_width + $notes_width + $ppi_date_width;
$header_row = "
Elder Name | ";
$header_row.= "Phone | ";
$header_row.= "Priority | ";
+ $header_row.= "Last PPI | ";
$header_row.= "Scheduling Notes | ";
- $table_data="";
+ $table_data=""; $completed_data=""; $totals_data="";
$year = date('Y');
@@ -937,6 +938,9 @@ class eq
$this->db2->query($sql,__LINE__,__FILE__);
if(!$this->db2->next_record()) {
+ $sql = "SELECT * FROM eq_ppi WHERE elder=" . $id . " AND eqpresppi=1 ORDER BY date DESC";
+ $this->db->query($sql,__LINE__,__FILE__);
+ if($this->db->next_record()) { $date = $this->db->f('date'); } else { $date = ""; }
$table_data.= "$name | ";
$table_data.= "$phone | ";
//$table_data.= "$ppi_pri | ";
@@ -948,18 +952,45 @@ class eq
$table_data.= '';
}
$table_data.= '';
+ $table_data.= "$date | ";
$table_data.= '';
$table_data.= '';
$table_data.= '';
$table_data.= ' | ';
+ $table_data.= '
';
$tr_color = $this->nextmatchs->alternate_row_color($tr_color);
$this->t->set_var('tr_color',$tr_color);
- $table_data.= '';
} else {
+ $link_data['menuaction'] = 'eq.eq.ppi_update';
+ $link_data['interviewer'] = $this->db2->f('interviewer');
+ $link_data['elder'] = $this->db2->f('elder');
+ $link_data['aaronic'] = $this->db2->f('aaronic');
+ $link_data['name'] = $name;
+ $link_data['ppi'] = $this->db2->f('ppi');
+ $link_data['eqpresppi'] = $this->db2->f('eqpresppi');
+ $link_data['action'] = 'view';
+ $link = $GLOBALS['phpgw']->link('/eq/index.php',$link_data);
$elders_with_yearly_ppi++;
+ $date = $this->db2->f('date');
+ $ppi_notes = $this->db2->f('notes');
+ if(strlen($ppi_notes) > 40) { $ppi_notes = substr($ppi_notes,0,40) . "..."; }
+ $completed_data.= "$name | ";
+ $completed_data.= "$phone | ";
+ $completed_data.= "$date | ";
+ $completed_data.= "$ppi_notes | ";
+ $completed_data.= '
';
+ $tr_color2 = $this->nextmatchs->alternate_row_color($tr_color2);
+ $this->t->set_var('tr_color2',$tr_color2);
}
}
+ $name_width=175; $phone_width=100; $date_width=100; $notes_width=300;
+ $completed_table_width=$name_width + $phone_width + $date_width + $notes_width;
+ $completed_header_row = "Elder Name | ";
+ $completed_header_row.= "Phone | ";
+ $completed_header_row.= "Date | ";
+ $completed_header_row.= "PPI Notes | ";
+
$elders_width=300; $totals_width=100;
$totals_table_width=$elders_width + $totals_width;
$totals_header_row = "Elders | ";
@@ -980,6 +1011,9 @@ class eq
$this->t->set_var('table_data',$table_data);
$this->t->set_var('totals_header_row',$totals_header_row);
$this->t->set_var('totals_table_width',$totals_table_width);
+ $this->t->set_var('completed_header_row',$completed_header_row);
+ $this->t->set_var('completed_table_width',$completed_table_width);
+ $this->t->set_var('completed',$completed_data);
$this->t->set_var('totals',$totals_data);
$this->t->fp('list','elder_list',True);