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

index edc1a82..c42fa21 100644 (file)
@@ -89,14 +89,13 @@ class Pman_Core_DataObjects_Core_curr_rate extends DB_DataObject
             
             
             $nl->from_dt = DB_DataObject::sqlValue("NOW()");
-            
+            $nl->to_dt = DB_DataObject::sqlValue("NOW() + INTERVAL 7 DAY");
             if ($ov->find(true)) {
                 if (strtotime($ov->to_date) > time()) {
                     continue;
                 }
                 $nl->from_dt = $ov->to_date;
-            
-            
+                
             
                 if ($ov->rate == $rate) {
                     // modify the old one to expire
@@ -106,6 +105,7 @@ class Pman_Core_DataObjects_Core_curr_rate extends DB_DataObject
                     continue;
                 }
             }
+            
             // create a new row.