<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */


class ExportZahlungen extends ExportBasis
{
  
  public function initiate()
  {
    ExportBasis::initiate();
    $this->dboperations = new DBWorkZahlung(1, true);
  }

  
  public function export()
  {
    $this->clearResult();
    for ($i = 0; $i < count($this->exportsets); $i++) {
      $tmp = $this->dboperations->getOne($this->exportsets[$i]->id);
      if (isset($tmp->id)) {
        array_push($this->exportresults, $tmp);
      }
    }
  }

  
  public function getVarValue($varname)
  {
    switch ($this->getVarCategory($varname)) {
      default: return ExportBasis::getVarValue($varname);
      case 'zahlung_': 
        return $this->expCalculation->getVarValue4Zahlung($this->getVarName($varname), $this->exportresults[$this->actualset]);
    }
  }
}