add notes to change history, RT#76002
[freeside.git] / httemplate / view / cust_main / change_history.html
index fe11b95..f28196a 100644 (file)
@@ -32,6 +32,7 @@ tie my %years, 'Tie::IxHash',
 tie my %tables, 'Tie::IxHash',
   'cust_main'         => 'Customer',
   'cust_main_invoice' => 'Invoice destination',
+  'cust_main_note'    => 'Note',
   'cust_pkg'          => 'Package',
   #? or just svc_* ? 'cust_svc' => 
   'svc_acct'          => 'Account',
@@ -46,6 +47,7 @@ tie my %tables, 'Tie::IxHash',
   'phone_device'      => 'Phone device',
   'cust_pkg_discount' => 'Discount',
   #? it gets provisioned anyway 'phone_avail'         => 'Phone',
+  'cust_tag'          => 'Tag',
 ;
 
 my $pkg_join = "JOIN cust_pkg USING ( pkgnum )";
@@ -159,10 +161,10 @@ foreach my $table ( keys %tables ) {
 #   but it would spoil database optimizations on this lookup
 my @svcnumobj = qsearch({
   'select' => 'DISTINCT svcnum',
-  'hashref'   => { 'custnum' => $cust_main->custnum,
-                   'history_date' =>  { op=>'>=', value=>$newer_than } },
+  'hashref'   => { 'history_date' =>  { op=>'>=', value=>$newer_than } },
   'table'  => 'h_cust_svc',
   'addl_from' => 'JOIN cust_pkg USING (pkgnum)',
+  'extra_sql' => ' AND custnum = '. $cust_main->custnum,
 });
 
 # now grab those svcs explicitly