쇼핑몰관리 : #33 일별 매출현황 웹표준 및 스타일 1차 작업 완료

This commit is contained in:
rollydream
2013-04-04 11:39:01 +09:00
parent 12ee2b02f8
commit 146b662fc0
2 changed files with 107 additions and 89 deletions

View File

@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r");
$fr_date = preg_replace("/([0-9]{4})([0-9]{2})/", "\\1-\\2", $fr_date);
$to_date = preg_replace("/([0-9]{4})([0-9]{2})/", "\\1-\\2", $to_date);
$g4['title'] = "$fr_month ~ $to_month 매출현황"; /*레이블 중복 인식과 페이지와의 연결 때문에 year로 바꿈 김혜련 2013-04-04*/
$g4['title'] = "$fr_month ~ $to_month 매출현황"; /*레이블 중복 인식과 페이지와의 연결 때문에 month로 바꿈 김혜련 2013-04-04*/
include_once (G4_ADMIN_PATH.'/admin.head.php');
function print_line($save)

View File

@ -9,23 +9,36 @@ $date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $date);
$g4['title'] = "$date 매출현황";
include_once (G4_ADMIN_PATH.'/admin.head.php');
?>
<style type="text/css">
.sale1{text-align:center}
</style>
<?//=subtitle($g4['title'])?>
<table cellpadding=0 cellspacing=0 width=100%>
<tr><td colspan=9 height=2 bgcolor=#0E87F9></td></tr>
<tr align=center class=ht>
<td width=100 align=center>주문번호</td>
<td align=center>주문자</td>
<td width=90 align=right>주문합계</td>
<td width=90 align=right>취소+DC</td>
<td width=90 align=right>무통장입금</td>
<td width=90 align=right>카드입금</td>
<td width=90 align=right>포인트입금</td>
<td width=90 align=right>입금취소</td>
<td width=90 align=right>미수금</td>
</tr>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
<section class="cbox">
<h2>일별 매출현황</h2>
<table>
<colgroup>
<col class="grid_2">
<col class="grid_2">
<col class="grid_2">
<col class="grid_2">
<col class="grid_2">
<col class="grid_2">
<col class="grid_2">
<col class="grid_2">
<col class="grid_2">
</colgroup>
<thead>
<th scope="col" class="sale1">주문번호</th>
<th scope="col" class="sale1">주문자</th>
<th scope="col">주문합계</th>
<th scope="col">취소+DC</th>
<th scope="col">무통장입금</th>
<th scope="col">카드입금</th>
<th scope="col">포인트입금</th>
<th scope="col">입금취소</th>
<th scope="col">미수금</th>
</thead>
<tbody>
<?
unset($tot);
$sql = " select od_id,
@ -46,7 +59,7 @@ $result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i > 0)
echo "<tr><td colspan=9 height=1 bgcolor=#EEEEEE></td></tr>\n";
echo '<tr><td colspan="9"></td></tr>';
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
@ -64,18 +77,19 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
echo "
<tr class=ht>
<td align=center><a href='./orderform.php?od_id=$row[od_id]'>$row[od_id]</a></td>
<td align=center>$href$row[od_name]</a></td>
<td align=right>".number_format($row1['orderamount'])."</td>
<td align=right>".number_format($row1['ordercancel'] + $row['od_dc_amount'])."</td>
<td align=right>".number_format($row['od_receipt_bank'])."</td>
<td align=right>".number_format($row['od_receipt_card'])."</td>
<td align=right>".number_format($row['od_receipt_point'])."</td>
<td align=right>".number_format($row['receiptcancel'])."</td>
<td align=right>".number_format($misu)."</td>
</tr>\n";
?>
<tr class="sale1">
<td><a href='./orderform.php?od_id=$row[od_id]'><?=$row[od_id]?></a></td>
<td ><?=$href?><?=$row[od_name]?></a></td>
<td><?=number_format($row1['orderamount'])?></td>
<td><?=number_format($row1['ordercancel'] + $row['od_dc_amount'])?></td>
<td><?=number_format($row['od_receipt_bank'])?></td>
<td><?=number_format($row['od_receipt_card'])?></td>
<td><?=number_format($row['od_receipt_point'])?></td>
<td><?=number_format($row['receiptcancel'])?></td>
<td><?=number_format($misu)?></td>
</tr>
<?
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
@ -89,22 +103,26 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
}
if ($i == 0) {
echo "<tr><td colspan=9 align=center height=100 bgcolor=#FFFFFF><span class=point>자료가 한건도 없습니다.</span></td></tr>";
echo '<tr><td colspan="9" class="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
}
?>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
<tr class=ht>
<td align=center colspan=2>합 계</td>
<td align=right><?=number_format($tot['orderamount'])?></td>
<td align=right><?=number_format($tot['ordercancel']+ $tot['dc'])?></td>
<td align=right><?=number_format($tot['receipt_bank'])?></td>
<td align=right><?=number_format($tot['receipt_card'])?></td>
<td align=right><?=number_format($tot['receipt_point'])?></td>
<td align=right><?=number_format($tot['receiptcancel'])?></td>
<td align=right><?=number_format($tot['misu'])?></td>
</tbody>
<tfoot>
<tr>
<td colspan="2">합 계</td>
<td><?=number_format($tot['orderamount'])?></td>
<td><?=number_format($tot['ordercancel']+ $tot['dc'])?></td>
<td><?=number_format($tot['receipt_bank'])?></td>
<td><?=number_format($tot['receipt_card'])?></td>
<td><?=number_format($tot['receipt_point'])?></td>
<td><?=number_format($tot['receiptcancel'])?></td>
<td><?=number_format($tot['misu'])?></td>
</tr>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
</tfoot>
</table>
</section>
<?
include_once (G4_ADMIN_PATH.'/admin.tail.php');