<?php

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


class MenuEinstellTool38 extends MenuEinstell
{
  public $file = 'writecolumnstool38.php';

  
  protected function _getSights()
  {
    $result = array();

    $sightIds = array(
          487 => 'Honorarabrechnung'
    );

    foreach ($sightIds as $sightId => $description) {
      $result[] = $this->_createSightObj($sightId, \ToolsAPI::TOOL_HONORAR_DOZ, $description);
    }

    return $result;
  }

  public function mainmenu($pEinstieg, $pEditId, $pSightId)
  {
    
    if ($pEinstieg == 1) {
      $this->getUebersichtEinstell(SessionOperations::getVarValueIntern('menutext'));
    } else { 

      echo"
      <table border='0' cellpadding='0' cellspacing='5' height='100%' width='100%'>
        <tr>
          <td valign='top' width='100%' height='5%'>
            <p align='right'><font id='text_basys_webtools'>" . KUFERTOOLS . '</font></p>
          </td>
        </tr>
      </table>
      ';

      switch ($pSightId) {
        case 487: 

          $objsettings = ToolSettingsAPI::getToolSettings(\ToolsAPI::TOOL_HONORAR_DOZ);

          echo '<h2>Einstellungen für die Honorarabrechnung</h2>' . BR_WT;
          echo $this->getStandardEinstellFormHeader(\ToolsAPI::TOOL_HONORAR_DOZ, 'honorar', $pSightId);
          echo '<h4>Reklamation von Honorargutschriften:</h4>';
          $checked = '';
          if ($objsettings->sendInfoMailBeiReklamation) {
            $checked = 'checked="checked"';
          }
          echo '<input type="checkbox" ' . $checked . ' name="sendInfoMailBeiReklamation" id="sendInfoMailBeiReklamation">' . "\n";
          echo '<label for="sendInfoMailBeiReklamation"> E-Mail bei Reklamation senden</label>';
          echo $this->createTextFieldForEmailAddress('vhsEmailTool38Section487', $objsettings->vhsEmailTool38Section487, true) . BR_WT;
          echo '<h4>Zahlungen ab folgendem Datum anzeigen:</h4>';
          echo '<input name="zahlungenAbDatum" value="' . CleanOperations::cleanStringForHtml($objsettings->zahlungenAbDatum) . '" class="date">' . BR_WT . BR_WT;

          echo "<input type='image' title='Speichern' src='layout/button_save.gif' border='0'>" . BR_WT . BR_WT . '
            </form>';
          break;

      }
    }
  }
}