<?php
/**
 * The show import view file of account 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     account
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<div class='panel'>
  <div class='panel-heading'>
    <strong class='text-danger'><?php echo sprintf($lang->kingdee->importResult, count($savedAccounts), count($errorAccounts));?></strong>
    <div class="panel-actions pull-right">
      <?php echo html::a($this->createLink('crm.browse', "mode=all&status=wait"), $lang->kingdee->showImport, "class='btn btn-primary'");?>
    </div>
  </div>
  <?php if(!empty($errorAccounts)):?>
  <table class='table table-condensed table-hover table-striped error-report'>
    <thead>
      <tr class='text-left'>
        <th><?php echo $lang->kingdee->code;?></th>
        <th><?php echo $lang->kingdee->name;?></th>
        <th><?php echo $lang->kingdee->type;?></th>
        <th><?php echo $lang->kingdee->dc;?></th>
        <th><?php echo $lang->kingdee->currency;?></th>
        <th><?php echo $lang->kingdee->hsxm;?></th>
        <th><?php echo $lang->kingdee->hsxmbm;?></th>
        <th><?php echo $lang->kingdee->hsxmmc;?></th>
        <th><?php echo $lang->kingdee->failReason;?></th>
      </tr>
    </thead>
    <tbody>
      <?php foreach($errorAccounts as $account):?>
      <tr>
        <td><?php echo $account->code;?></td>
        <td><?php echo $account->name;?></td>
        <td><?php echo $account->type;?></td>
        <td><?php echo $account->dc;?></td>
        <td><?php echo $account->currency;?></td>
        <td><?php echo $account->hsxm;?></td>
        <td><?php echo $account->hsxmbm;?></td>
        <td><?php echo $account->hsxmmc;?></td>
        <td><?php echo $account->reason;?></td>
      </tr>
      <?php endforeach;?>
    </tbody>
  </table>
  <?php endif ;?>
</div>
<?php include '../../common/view/footer.html.php';?>
