<style type="text/css" media="print">
    @page  {
        size: A4 landscape;
        margin: 0mm;
    }
</style>
<div class="p-detail-sold__title d-flex"><h3 class="p-detail-summary__title"><?php echo e($item->article_name); ?></h3><span class="p-detail-summary__id">No.<?php echo e($item->building_id); ?></span></div>

<div class="d-flex">
    <div class="p-detail-sold__left">
        <p class="sold_list_title">売出中物件</p>
        <div class="swap-table">
            <table class="sold_list">
            <thead>
                <tr>
                    <th class="">番号</th>
                    <th class="">売出価格</th>
                    <th class="">坪単価（売出）</th>
                    <th class="">階数</th>
                    <th>専有面積</th>
                </tr>
            </thead>
            <tbody class="sold_list_con">
                <?php $__currentLoopData = $article_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $room): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr id="mansion_<?php echo e($room->mansion_id); ?>">
                        <td class="">
                            <!--<a class="viewDetailPopup" href="javascript:void(0);" data-id="<?php echo e($room->building_id); ?>"><?php echo e($room->building_id); ?></a>-->
                            <form target="_blank" action="/business/mansion/detail/<?php echo e($room->building_id); ?>" id="viewDetail<?php echo e($room->building_id); ?>" method="post">
                                <?php echo csrf_field(); ?>
                                <input type="hidden" name="building_id_print" value="<?php echo e(implode(',', $article_list->pluck('building_id')->toArray())); ?>">
                                <input type="hidden" name="detail_id" value="<?php echo e($room->building_id); ?>">
                            </form>
                            <a href="javascript:void(0)" onclick="$('#viewDetail<?php echo e($room->building_id); ?>').submit();" href-id="<?php echo e($room->mansion_id); ?>" id="btnDetail<?php echo e($room->building_id); ?>"><?php echo e($room->building_id); ?></a>
                        </td>
                        <td class=""><?php if($room->price): ?><?php echo e(number_format($room->price, 0, ",", ",")); ?>万円<?php else: ?>-<?php endif; ?></td>
                        <td class=""><?php if($room->tsubo): ?><?php echo e($room->tsubo); ?>万円<?php else: ?>-<?php endif; ?></td>
                        <td class=""><?php echo e($room->whereabouts); ?></td>
                        <td class=""><?php echo e($room->total_area_val); ?>m&sup2;</td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php for($i = 0; $i < 50-count($article_list) ; $i++): ?>
                    <tr>
                        <td class=""></td>
                        <td class=""></td>
                        <td class=""></td>
                        <td class=""></td>
                        <td class=""></td>
                    </tr>
                <?php endfor; ?>
            </tbody>
        </table>
        </div>
    </div>
    <div class="p-detail-sold__right">
        <p class="sold_list_title">成約済物件</p>
        <div class="swap-table">
            <table class="sold_list">
                <thead>
                    <tr>
                        <th class="">番号</th>
                        <th class="">最終価格</th>
                        <th class="">成約価格</th>
                        <th class="">坪単価（成約）</th>
                        <th class="">階数</th>
                        <th class="">専有面積</th>
                        <th>成約年月日</th>
                        <th>ステータス</th>
                    </tr>
                </thead>
                <tbody class="sold_list_con">
                    <?php $__currentLoopData = $sold_article_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $room): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr id="close_<?php echo e($item->building_id); ?>">
                            <td class="">
                                <form target="_blank" action="/business/mansion/detail/<?php echo e($room->building_id); ?>" id="viewDetail<?php echo e($room->building_id); ?>" method="post">
                                    <?php echo csrf_field(); ?>
                                    <input type="hidden" name="building_id_print" value="<?php echo e(implode(',', $sold_article_list->pluck('building_id')->toArray())); ?>">
                                    <input type="hidden" name="detail_id" value="<?php echo e($room->building_id); ?>">
                                </form>
                                <a href="javascript:void(0)" onclick="$('#viewDetail<?php echo e($room->building_id); ?>').submit();" href-id="<?php echo e($item->building_id); ?>" id="bnDetailClose<?php echo e($room->building_id); ?>"><?php echo e($room->building_id); ?></a>
                            </td>
                            <td class=""><?php if($room->price): ?><?php echo e(number_format($room->price, 0, ",", ",")); ?>万円<?php else: ?>-<?php endif; ?></td>
                            <td class=""><?php if($room->price_closing and $room->status==4): ?><?php echo e(number_format($room->price_closing, 0, ",", ",")); ?>万円<?php else: ?>-<?php endif; ?></td>
                            <td class=""><?php if($room->tsubo_closing and $room->status==4): ?><?php echo e($room->tsubo_closing); ?>万円<?php else: ?>-<?php endif; ?></td>
                            <td class=""><?php echo e($room->whereabouts); ?></td>
                            <td class=""><?php echo e($room->total_area_val); ?>m&sup2;</td>
                            <td ><?php echo e($room->close_date); ?></td>
                            <td >
                                <?php if($room->status==4): ?>
                                    契約済
                                <?php elseif($room->status==5): ?>
                                    売りやめ
                                <?php endif; ?>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php for($i = 0; $i < 50-count($sold_article_list) ; $i++): ?>
                        <tr>
                            <td class=""></td>
                            <td class=""></td>
                            <td class=""></td>
                            <td class=""></td>
                            <td class=""></td>
                            <td class=""></td>
                            <td></td>
                            <td></td>
                        </tr>
                    <?php endfor; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
