<div class="content-wrapper">
    <section class="content-header">
        <?=$this->partial('layout/breadcrumb')?>

        <h1 class="pull-right">
            <a href="<?=$this->url('stock-check');?>" class="btn btn-default btn-sm"><i class="fa fa-arrow-left"></i> <?=$this->translate('返回盘点列表')?></a>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-md-12">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?=$this->translate('库存盘点详情')?></h3>
                    </div>

                    <div class="box-body">
                        <div class="row">
                            <div class="col-xs-4 form-group">
                                <div class="col-sm-12">
                                    <b><?=$this->translate('盘点单号')?>：</b><?=$this->escapeHtml($this->stockCheckInfo->getStockCheckSn());?>
                                </div>
                            </div>

                            <div class="col-xs-4 form-group">
                                <div class="col-sm-12">
                                    <b><?=$this->translate('仓库')?>：</b><?=$this->escapeHtml($this->stockCheckInfo->getOneWarehouse()->getWarehouseName());?>
                                </div>
                            </div>

                            <div class="col-xs-4 form-group">
                                <div class="col-sm-12">
                                    <b><?=$this->translate('状态')?>：</b><?=$this->stockCheckInfo->getStockCheckState() == 1 ? $this->translate('已盘点') : $this->translate('待盘点');?>
                                </div>
                            </div>

                        </div>

                        <div class="row">
                            <div class="col-xs-4 form-group">
                                <div class="col-sm-12">
                                    <b><?=$this->translate('盘点时间')?>：</b><?=date("Y-m-d", $this->stockCheckInfo->getStockCheckTime());?>
                                </div>
                            </div>
                            <div class="col-xs-4 form-group">
                                <div class="col-sm-12">
                                    <b><?=$this->translate('盘点人')?>：</b><?=$this->escapeHtml($this->stockCheckInfo->getStockCheckUser());?>
                                </div>
                            </div>
                            <div class="col-xs-4 form-group">
                                <div class="col-sm-12">
                                    <b><?=$this->translate('盘点备注')?>：</b><?=$this->escapeHtml($this->stockCheckInfo->getStockCheckInfo());?>
                                </div>
                            </div>
                        </div>

                        <div class="box-header">
                            <h4 class="box-title"><?=$this->translate('盘点商品')?></h4>
                        </div>
                        <div class="box-body table-responsive no-padding">
                            <table class="table table-hover">
                                <thead>
                                <tr>
                                    <th width="15%"><?=$this->translate('商品编号')?></th>
                                    <th width="20%"><?=$this->translate('商品名称')?></th>
                                    <th width="15%"><?=$this->translate('商品规格')?></th>
                                    <th width="5%"><?=$this->translate('单位')?></th>
                                    <th width="8%"><?=$this->translate('盘点前库存数量')?></th>
                                    <th width="10%"><?=$this->translate('盘点后库存数量')?></th>
                                    <th width="10%"><?=$this->translate('盘点后库存金额')?></th>
                                </tr>
                                </thead>
                                <?php foreach ($this->stockCheckGoods as $goodsValue) { ?>
                                    <tr>
                                        <td><?=$this->escapeHtml($goodsValue->getGoodsNumber())?></td>
                                        <td><?=$this->escapeHtml($goodsValue->getGoodsName())?></td>
                                        <td><?=$this->escapeHtml($goodsValue->getGoodsSpec())?></td>
                                        <td><?=$this->escapeHtml($goodsValue->getGoodsUnit())?></td>
                                        <td><?=$goodsValue->getStockCheckPreGoodsNum()?></td>
                                        <td><?=$goodsValue->getStockCheckAftGoodsNum()?></td>
                                        <td><?=$this->erpCurrencyFormat($goodsValue->getStockCheckGoodsAmount())?></td>
                                    </tr>
                                <?php } ?>

                                <tfoot>
                                <tr>
                                    <td colspan="5"></td>
                                    <td colspan="2" class="text-right"><b><?=$this->translate('金额合计')?>：</b><span id="order-amount"><?=(isset($this->stockCheckInfo) ? $this->erpCurrencyFormat($this->stockCheckInfo->getStockCheckAmount()) : 0)?></span></td>
                                </tr>
                                </tfoot>
                            </table>
                        </div>

                    </div>

                </div>


            </div>
        </div>

    </section>

</div>