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


class AbweichenderZahler extends Datamodul
{
  
  public $name;
  public $vorname;
  public $titel;
  public $geschlecht;
  public $gebdat;
  public $zusatz;
  public $zusatz2;
  public $bic;
  public $iban;
  public $nurstrasse;
  public $nurhausnr;
  public $nurort;
  public $nurplz;
  public $email;
  public $tel;
  public $tnr = -1;
  public $tel2;
  public $tel3;
  public $fax;
  public $bemerkung;
  public $newslerlaubt;
  public $newslbemerkung;

  public function getTyp($pFieldName)
  {
    switch ($pFieldName) {
      default:
        return parent::getTyp($pFieldName);
      case 'tnr':
      case 'plz':
        return \DatamodulVarType::TYPE_INT;
    }
  }

  public function getVarValue($name)
  {
    switch ($name) {
      case 'strasse':
      return trim($this->nurstrasse . ' ' . $this->nurhausnr);
      case 'ort':
        return trim($this->nurplz . ' ' . $this->nurort);
    }

    return parent::getVarValue($name);
  }
}