<?php
/**
 * The ameba view file of setting module of ZDOO.
 *
 * @copyright   Copyright 2009-2017 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Gang Liu <liugang@cnezsoft.com>
 * @package     setting 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<div class='panel'>
  <div class='panel-heading'>
    <strong><?php echo $lang->ameba->setting;?></strong>
  </div>
  <form id='ajaxForm' method='post'>
    <table class='table table-form'>
      <tr>
        <th class='w-100px'><?php echo $lang->ameba->period;?></th>
        <td class='w-140px'><?php echo html::select('period', $lang->ameba->periodList, zget($config->ameba, 'period', ''), "class='form-control'");?></td>
        <td class='w-200px'></td>
        <td></td>
      </tr>
      <tr>
        <th><?php echo $lang->ameba->beginDate;?></th>
        <td><?php echo html::input('beginDate', zget($config->ameba, 'beginDate', ''), "class='form-control form-date'");?></td>
        <td></td>
        <td></td>
      </tr>
      <tr>
        <th><?php echo $lang->ameba->taxRate;?></th>
        <td>
          <div class='input-group'>
            <?php echo html::input('taxRate', zget($config->ameba, 'taxRate', ''), "class='form-control'");?>
            <span class='input-group-addon'>%</span>
          </div>
        </td>
        <td></td>
        <td></td>
      </tr>
      <tr>
        <th><?php echo $lang->ameba->laborCategory;?></th>
        <td colspan='2'><?php echo html::select('laborCategory', $expenseCategories, zget($config->ameba, 'laborCategory', ''), "class='form-control chosen'");?></td>
        <td></td>
      </tr>
      <tr>
        <th><?php echo $lang->ameba->shareDepts;?></th>
        <td colspan='2'><?php echo html::select('shareDepts[]', $depts, zget($config->ameba, 'shareDepts', ''), "class='form-control chosen' multiple");?></td>
        <td></td>
      </tr>
      <tr>
        <th><?php echo $lang->ameba->excludeCategory;?></th>
        <td colspan='3'><?php echo html::select('excludeCategories[]', $incomeCategories + $expenseCategories, zget($config->ameba, 'excludeCategories', ''), "class='form-control chosen' multiple");?></td>
      </tr>
      <tr>
        <th><?php echo $lang->ameba->reportType;?></th>
        <td colspan='3'>
          <?php foreach($lang->ameba->reportTypeList as $type => $label):?>
          <div class='radio'>
            <label>
              <input type='radio' name='reportType' value='<?php echo $type;?>' id='reportType<?php echo $type;?>' <?php if(zget($config->ameba, 'reportType', '') == $type) echo "checked='checked'";?> class='reportType'>
              <span class=''><?php echo $label;?></span>
              <?php echo html::input('reportNum', zget($config->ameba, 'reportNum', ''), "class='form-control reportNum'");?>
              <span class=''><?php echo $lang->ameba->reportOther;?></span>
            </label>
          </div>
          <?php endforeach;?>
        </td>
      </tr>
      <tr>
        <th></th>
        <td colspan='3' class='form-actions'><?php echo html::submitButton();?></td>
      </tr>
    </table>
  </form>
</div>
<?php include '../../common/view/footer.html.php';?>
