<?php include_once( "../../spider.inc.php" ); ?>
{charset:UTF-8}
{module:system.login.Require}
{module:shopping.LoadConfig}
{module:shopping.category.LoadList}
{module:shopping.order.LoadList}
{module:shopping.report.promotion.Statistic}

<div>
	{if:shopping.is_setup}
	{if:IS_ERROR}
		<ul class="error">
		{foreach:errors error}
			<li>{write:error}</li>
		{/foreach}
		</ul>
	{else}
	<div style="width:49%;float:left;">
	<table class="list" style="width:99%;margin:0 auto;">
	<thead>
	<tr>
		<th colspan="3">今月の{write:SHOPPING_LABEL_ORDER}</th>
	</tr>
	</thead>
	<tbody>
	{foreach:shopping.order.data_array orderObject}
	{set:memberObject orderObject::memberObject}
	<tr>
		<td>
			{write:orderObject->'registered_date_year'}/{write:orderObject->'registered_date_month'}/{write:orderObject->'registered_date_day'}
		</td>
		<td>
			<a href="javascript:shoppingOrderViewDetail({write:orderObject->'order_number'});">{write:memberObject->'family_name'}{write:memberObject->'first_name'}様</a>
		</td>
		<td>
			&yen;{write:number_format(orderObject->'payment_total')}-
		</td>
	</tr>
	{if:shopping_order_data_array_loop_counter>=10}<?php break; ?>{/if}
	{/foreach}
	</tbody>
	</table>
	<div style="text-align:right;">
		<a href="/<?php echo SYSTEM_DIR_NAME_ADMIN_PANEL; ?>/shopping/order/">&gt;&gt; すべて見る</a>
	</div>
	</div>

	<div style="width:49%;float:left;margin-left:1%;">
	<table class="list" style="width:99%;margin:0 auto;">
	<thead>
	<tr>
		<th colspan="3">今月のプロモーション成果</th>
	</tr>
	</thead>
	<tbody>
	<tr class="list">
		<th class="list">プロモーション名</th>
		<th class="list">未確定</th>
		<th class="list">承認済</th>
	</tr>
	{foreach:shopping.report.promotion.statistic.resultHash promotionCode reportDataHash}
	<tr>
		<td>{write:reportDataHash['promotion_name']}</td>
		<td style='text-align:right;'>
			&yen;{if:strlen(trim(reportDataHash['money_0']))==0}0{else}{write:number_format(reportDataHash['money_0'])}{/if}
		</td>
		<td style='text-align:right;'>
			&yen;{if:strlen(trim(reportDataHash['money_10']))==0}0{else}{write:number_format(reportDataHash['money_10'])}{/if}
		</td>
	</tr>
	{if:shopping_promotion_report_resultHash_loop_counter>=9}<?php break; ?>{/if}
	{/foreach}
	</tbody>
	</table>
	<div style="text-align:right;">
		<a href="/<?php echo SYSTEM_DIR_NAME_ADMIN_PANEL; ?>/shopping/promotion/report/statistic.php">&gt;&gt; すべて見る</a>
	</div>
	</div>

	<br style="clear:left;" />
	{/if}
	{/if}
</div><br />