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

        <h1 class="pull-right">
            <a href="<?php echo $this->url('erp-stock');?>" class="btn btn-default btn-sm"><i class="fa fa-arrow-left"></i> <?php echo $this->translate('返回其他入库单列表'); ?></a>
            <button type="button" onclick="toPrint();" class="btn btn-primary btn-sm"><i class="fa fa-print" aria-hidden="true"></i> <?php echo $this->translate('点击打印'); ?></button>
            <?php echo $this->HelpUrl('otherImport'); ?>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-md-12" id="to-print-info">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo $this->translate('入库单'); ?></h3>
                    </div>

                    <div class="box-body">

                        <div class="box-header">
                            <h4 class="box-title"><?php echo $this->translate('入库商品'); ?></h4>
                        </div>
                        <div class="box-body table-responsive no-padding">
                            <table class="table table-hover">
                                <thead>
                                <tr>
                                    <th width="15%"><?php echo $this->translate('商品编号'); ?></th>
                                    <th width="20%"><?php echo $this->translate('商品名称'); ?></th>
                                    <th><?php echo $this->translate('商品规格'); ?></th>
                                    <th><?php echo $this->translate('单位'); ?></th>
                                    <th><?php echo $this->translate('入库单价'); ?></th>
                                    <th><?php echo $this->translate('入库数量'); ?></th>
                                    <th width="10%"><?php echo $this->translate('入库总价'); ?></th>
                                    <th><?php echo $this->translate('入库单号'); ?></th>
                                    <th><?php echo $this->translate('仓库'); ?></th>
                                    <th><?php echo $this->translate('入库时间'); ?></th>
                                    <th><?php echo $this->translate('入库备注'); ?></th>
                                </tr>
                                </thead>
                                <?php foreach ($this->orderGoods as $goodsValue) { ?>
                                    <tr>
                                        <td><?php echo $this->escapeHtml($goodsValue->getGoodsNumber()); ?></td>
                                        <td><?php echo $this->escapeHtml($goodsValue->getGoodsName()); ?></td>
                                        <td><?php echo $this->escapeHtml($goodsValue->getGoodsSpec()); ?></td>
                                        <td><?php echo $this->escapeHtml($goodsValue->getGoodsUnit()); ?></td>
                                        <td><?php echo $this->erpCurrencyFormat($goodsValue->getWarehouseGoodsPrice()); ?></td>
                                        <td><?php echo $goodsValue->getWarehouseGoodsBuyNum(); ?></td>
                                        <td><?php echo $this->erpCurrencyFormat($goodsValue->getWarehouseGoodsAmount()); ?></td>
                                        <td><?php echo $goodsValue->WarehouseOrderSn; ?></td>
                                        <td><?php echo $goodsValue->WarehouseName; ?></td>
                                        <td><?php echo date("Y-m-d H:i:s", $goodsValue->otherAddTime); ?></td>
                                        <td><?php echo $goodsValue->WarehouseOrderInfo; ?></td>
                                    </tr>
                                <?php } ?>

                                <tfoot>
                                <tr>
                                    <td colspan="6"></td>
                                    <td colspan="2" class="text-right"><b><?php echo $this->translate('总入库数'); ?>：</b><span id="order-amount"><?php echo (isset($this->otherWarehouseOrder) ? $this->otherWarehouseOrder->OtherWarehouseOrderGoodsAmount : 0); ?></span></td>
                                    <td colspan="2" class="text-right"><b><?php echo $this->translate('金额合计'); ?>：</b><span id="order-amount"><?php echo (isset($this->otherWarehouseOrder) ? $this->erpCurrencyFormat($this->otherWarehouseOrder->getWarehouseOrderAmount()) : 0); ?></span></td>
                                </tr>
                                </tfoot>
                            </table>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </section>
</div>