<?php
/**
 * The browse account view file of kingdee module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(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     kingdee
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<div id='menuActions'>
  <?php commonModel::printLink('kingdee', 'importAccount', "company={$company}", $lang->importIcon . $lang->kingdee->importAccount, "class='btn btn-primary' data-toggle='modal'");?>
</div>
<div class='panel main-table' data-ride='table'>
  <form id='ajaxForm' method='post' action="<?php echo $this->createLink('kingdee', 'batchDeleteAccount');?>">
    <table class='table' id='accountTable' data-fixed-left-width='' data-fixed-right-width='60'>
      <thead>
        <tr>
          <th class='text-left w-140px'>
            <div class='checkbox-primary check-all' title='<?php echo $this->lang->selectAll;?>'><label></label></div>
            <?php echo $lang->kingdee->number;?>
          </th>
          <th class='text-left'><?php echo $lang->kingdee->name;?></th>
          <th class='w-120px'><?php echo $lang->kingdee->groupID;?></th>
          <th class='w-80px'><?php echo $lang->kingdee->dc;?></th>

          <th class='flex-col w-70px' ><?php echo $lang->kingdee->currencyID;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->adjustRate;?></th>
          <th class='flex-col w-100px'><?php echo $lang->kingdee->contact;?></th>
          <th class='flex-col w-120px'><?php echo $lang->kingdee->quantities;?></th>
          <th class='flex-col w-120px'><?php echo $lang->kingdee->unitGroupID;?></th>
          <th class='flex-col w-100px'><?php echo $lang->kingdee->measureUnitID;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->isCash;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->isBank;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->journal;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->detailID;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->isBalance;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->mainItemID;?></th>
          <th class='flex-col w-70px' ><?php echo $lang->kingdee->subItemID;?></th>
          <th class='flex-col w-120px'><?php echo $lang->kingdee->itemClassNumber;?></th>
          <th class='flex-col w-120px'><?php echo $lang->kingdee->itemClassName;?></th>

          <th class='text-center'><?php echo $lang->actions;?></th>
        </tr>
      </thead>
      <tbody>
        <?php foreach($accounts as $account):?>
        <tr class='text-center'>
          <td class='text-left w-140px'>
            <div class='checkbox-primary'>
              <input type='checkbox' name='accountIDList[]' value="<?php echo $account->id;?>" id="accountIDList<?php echo $account->id;?>">
              <label for="accountIDList<?php echo $account->id;?>"></label>
            </div>
            <?php echo $account->number;?>
          </td>
          <td class='text-left'><?php echo $account->name;?></td>
          <td class='w-120px'><?php echo $account->groupID;?></td>
          <td class='w-80px'><?php echo $account->dc;?></td>

          <td class='w-70px' ><?php echo $account->currencyID;?></td>
          <td class='w-70px' ><?php echo $account->adjustRate;?></th>
          <td class='w-100px'><?php echo $account->contact;?></th>
          <td class='w-120px'><?php echo $account->quantities;?></th>
          <td class='w-120px'><?php echo $account->unitGroupID;?></th>
          <td class='w-100px'><?php echo $account->measureUnitID;?></th>
          <td class='w-70px' ><?php echo $account->isCash;?></th>
          <td class='w-70px' ><?php echo $account->isBank;?></th>
          <td class='w-70px' ><?php echo $account->journal;?></th>
          <td class='w-70px' ><?php echo $account->detailID;?></th>
          <td class='w-70px' ><?php echo $account->isBalance;?></th>
          <td class='w-70px' ><?php echo $account->mainItemID;?></th>
          <td class='w-70px' ><?php echo $account->subItemID;?></th>
          <td class='w-120px'><?php echo $account->itemClassNumber ? $account->itemClassNumber : '&nbsp;';?></th>
          <td class='w-120px'><?php echo $account->itemClassNumber ? $account->itemClassName   : '&nbsp;';?></th>

          <td class='w-60px' >
            <?php commonModel::printLink('kingdee', 'deleteAccount', "id={$account->id}", $lang->delete, "class='deleter'");?>
          </td>
        </tr>
        <?php endforeach;?>
      </tbody>
    </table>
    <div class='table-footer'>
      <div class='checkbox-primary check-all'><label><?php echo $lang->selectAll;?></label></div>
      <div class='table-actions btn-toolbar'><?php echo html::submitButton($lang->delete, 'btn btn-default');?></div>
      <div class='table-statistic'></div>
      <?php $pager->show();?> 
    </div>
  </form>
</div>
<?php include '../../common/view/footer.html.php';?>
