DataObjects/Events.php
authorKH Lau <khlau@roojs.com>
Mon, 4 Sep 2017 02:26:01 +0000 (10:26 +0800)
committerKH Lau <khlau@roojs.com>
Mon, 4 Sep 2017 02:26:01 +0000 (10:26 +0800)
DataObjects/Events.php

index fa86a9c..563f2c0 100644 (file)
@@ -25,7 +25,7 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
     public $person_id;                       // int(11)  
     public $remarks;                         // blob(65535)  blob
     public $person_table;                    // string(64)
-    public $investor_id;                           // int(11)  
+    public $coba_investor_id;                     // int(11)  
 
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
@@ -117,7 +117,10 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
             $this->whereAdd("$tn.on_table = ''");
         }
         
-        
+        if (!empty($q['query']['to'])) {
+            $dt = date('Y-m-d' , strtotime($q['query']['to']));
+            $this->whereAdd(" {$tn}.event_when <=  '$dt' ");
+        }
         
         if (isset($q['query']['person_sum'])) {
             //DB_DataObject::debugLevel(1);