DataObjects/Period.php
authorAlan Knowles <alan@roojs.com>
Wed, 25 Feb 2015 06:23:53 +0000 (14:23 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 25 Feb 2015 06:23:53 +0000 (14:23 +0800)
DataObjects/Period.php

index a62062e..718b154 100644 (file)
@@ -78,8 +78,13 @@ class Pman_Xtuple_DataObjects_Period extends DB_DataObject
     function initDatabase($roo)
     {
        
+         
+        if ($this->count()) {
+            echo "SKIP - already have periods\n";
+            return;
+        }
+        $p->initPeriods($roo);
         
-        $this->initPeriods($roo);
     }