]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttGroupExportHelper.class.php
Added monthly quotas to new export-import.
[timetracker.git] / WEB-INF / lib / ttGroupExportHelper.class.php
index e18f8c9f4fa7375157e2b782952269ba9913fe9f..b1aa35c035692bcb6e33d4e1699f089e622b8e6e 100644 (file)
@@ -445,6 +445,18 @@ class ttGroupExportHelper {
     fwrite($this->file, $this->indentation."  </expense_items>\n");
     unset($expense_items);
 
+    // Write monthly quotas.
+    $quotas = ttTeamHelper::getMonthlyQuotas($this->group_id);
+    fwrite($this->file, $this->indentation."  <monthly_quotas>\n");
+    foreach ($quotas as $quota) {
+      $quota_part = $this->indentation.'    '."<monthly_quota year=\"".$quota['year']."\"";
+      $quota_part .= " month=\"".$quota['month']."\"";
+      $quota_part .= " minutes=\"".$quota['minutes']."\"";
+      $quota_part .= "></monthly_quota>\n";
+      fwrite($this->file, $quota_part);
+    }
+    fwrite($this->file, $this->indentation."  </monthly_quotas>\n");
+
     // Call self recursively for all subgroups.
     foreach ($this->subgroups as $subgroup) {
       $subgroup_helper = new ttGroupExportHelper($subgroup['id'], $this->file, $this->indentation.'  ');