DataObjects/Core_curr_rate.php
authorAlan Knowles <alan@roojs.com>
Mon, 5 Oct 2015 07:22:48 +0000 (15:22 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 5 Oct 2015 07:22:48 +0000 (15:22 +0800)
DataObjects/Core_curr_rate.php

index a3b6b6f..f8a33f9 100644 (file)
@@ -41,14 +41,16 @@ class Pman_Core_DataObjects_Core_curr_rate extends DB_DataObject
         // how often do we need to know this..?
         // let's assume we do it once a week..
         $x = DB_DataObject::Factory('core_curr_rate');
-        $x->whereAdd('from_date > NOW() - INTERVAL 7 DAY');
+        $x->whereAdd('to_date > NOW()');
         if ($x->count()) {
+            // got some data for beyond today..
             return;
         }
         
         
         
         
+        
         if (!empty($this->rates)) {
             return true;
         }