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

class ExportAbweichendeLieferadresse extends ExportMitPflichtUndValidierungsFehler
{
  
  public function initiate()
  {
    parent::initiate();
    if (!$this->expCalculation instanceof ExportCalculation) {
      $this->expCalculation = new ExportCalculation($this);
    }
  }

  
  public function getVarValue($varname)
  {
    switch ($this->getVarCategory($varname)) {
      default: return parent::getVarValue($varname);
      case 'liefer_': return $this->expCalculation->getVarValue4Lieferadresse(
        $this->getVarName($varname),
        $this->exportresults[$this->actualset]
      );
      case 'ledit_': return $this->expCalculation->getVarValue4LieferadresseEdit(
        $this->getVarName($varname),
        $this->exportresults[$this->actualset]
      );
      case 'lbest_': return $this->expCalculation->getVarValue4LieferadresseBest(
        $this->getVarName($varname),
        $this->exportresults[$this->actualset]
      );
    }
  }
}