쇼핑몰관리자 : #42 상품유형관리 목록 표준화 및 스타일 1차 작업 완료

This commit is contained in:
rollydream
2013-04-08 13:25:08 +09:00
4 changed files with 315 additions and 273 deletions

View File

@ -34,6 +34,49 @@ function print_line($save)
</tr>
<?
}
unset($save);
unset($tot);
$lines = $lines1 = array();
$sql = " select uq_id,
SUBSTRING(od_time,1,10) as od_date,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$lines[$i] = $row;
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$lines1[$i] = $row1;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint '] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
?>
<style type="text/css">
@ -67,73 +110,6 @@ function print_line($save)
<th scope="col">미수금</th>
</tr>
</thead>
<tbody>
<?
unset($save);
unset($tot);
$sql = " select uq_id,
SUBSTRING(od_time,1,10) as od_date,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i == 0)
$save['od_date'] = $row['od_date'];
if ($save['od_date'] != $row['od_date']) {
print_line($save);
unset($save);
$save['od_date'] = $row['od_date'];
}
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$save['ordercount']++;
$save['orderamount'] += $row1['orderamount'];
$save['ordercancel'] += $row1['ordercancel'];
$save['dc'] += $row['od_dc_amount'];
$save['receiptbank'] += $row['od_receipt_bank'];
$save['receiptcard'] += $row['od_receipt_card'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['receiptcancel'] += $row['receiptcancel'];
$save['misu'] += $misu;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint '] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
echo '<tr><td colspan="9" class="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
} else {
print_line($save);
}
?>
</tbody>
<tfoot>
<tr class="sale1">
<td>합 계</td>
@ -147,6 +123,41 @@ function print_line($save)
<td><?=number_format($tot['misu'])?></td>
</tr>
</tfoot>
<tbody>
<?
unset($save);
unset($tot);
for ($i=0; $i<count($lines); $i++)
{
if ($i == 0)
$save['od_date'] = $lines[$i]['od_date'];
if ($save['od_date'] != $lines[$i]['od_date']) {
print_line($save);
unset($save);
$save['od_date'] = $lines[$i]['od_date'];
}
$misu = $lines1[$i]['orderamount'] - $lines1[$i]['ordercancel'] - $lines[$i]['od_dc_amount'] - $lines[$i]['receiptamount'] + $lines[$i]['receiptcancel'];
$save['ordercount']++;
$save['orderamount'] += $lines1[$i]['orderamount'];
$save['ordercancel'] += $lines1[$i]['ordercancel'];
$save['dc'] += $lines[$i]['od_dc_amount'];
$save['receiptbank'] += $lines[$i]['od_receipt_bank'];
$save['receiptcard'] += $lines[$i]['od_receipt_card'];
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
$save['receiptcancel'] += $lines[$i]['receiptcancel'];
$save['misu'] += $misu;
}
if ($i == 0) {
echo '<tr><td colspan="9" class="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
} else {
print_line($save);
}
?>
</tbody>
</table>
</section>

View File

@ -22,7 +22,7 @@ function print_line($save)
?>
<tr class="sale1">
<td><a href="./sale1date.php?fr_date=<?=$date?>01&to_date=<?=$date?>31"><?=$save[od_date]?></a></td>
<td><a href="./sale1date.php?fr_date=<?=$date?>01&to_date=<?=$date?>31"><?=$save['od_date']?></a></td>
<td><?=number_format($save['ordercount'])?></td>
<td><?=number_format($save['orderamount'])?></td>
<td><?=number_format($save['ordercancel'] + $save['dc'])?></td>
@ -34,6 +34,49 @@ function print_line($save)
</tr>
<?
}
unset($save);
unset($tot);
$lines = $lines1 = array();
$sql = " select uq_id,
SUBSTRING(od_time,1,7) as od_date,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,7) between '$fr_month' and '$to_month'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$lines[$i] = $row;
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$lines1[$i] = $row1;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
?>
<style type="text/css">
.sale1{text-align:center}
@ -65,73 +108,6 @@ function print_line($save)
<th scope="col">미수금</th>
</tr>
</thead>
<tbody>
<?
unset($save);
unset($tot);
$sql = " select uq_id,
SUBSTRING(od_time,1,7) as od_date,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,7) between '$fr_month' and '$to_month'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i == 0)
$save['od_date'] = $row['od_date'];
if ($save['od_date'] != $row['od_date']) {
print_line($save);
unset($save);
$save['od_date'] = $row['od_date'];
}
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$save['ordercount']++;
$save['orderamount'] += $row1['orderamount'];
$save['ordercancel'] += $row1['ordercancel'];
$save['dc'] += $row['od_dc_amount'];
$save['receiptbank'] += $row['od_receipt_bank'];
$save['receiptcard'] += $row['od_receipt_card'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['receiptcancel'] += $row['receiptcancel'];
$save['misu'] += $misu;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
echo '<tr><td colspan="9" class="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
} else {
print_line($save);
}
?>
</tbody>
<tfoot>
<tr class="sale1">
<td>합 계</td>
@ -145,6 +121,42 @@ function print_line($save)
<td><?=number_format($tot['misu'])?></td>
</tr>
</tfoot>
<tbody>
<?
unset($save);
unset($tot);
for ($i=0; $i<count($lines); $i++)
{
if ($i == 0)
$save['od_date'] = $lines[$i]['od_date'];
if ($save['od_date'] != $lines[$i]['od_date']) {
print_line($save);
unset($save);
$save['od_date'] = $lines[$i]['od_date'];
}
$misu = $lines1[$i]['orderamount'] - $lines1[$i]['ordercancel'] - $lines[$i]['od_dc_amount'] - $lines[$i]['receiptamount'] + $lines[$i]['receiptcancel'];
$save['ordercount']++;
$save['orderamount'] += $lines1[$i]['orderamount'];
$save['ordercancel'] += $lines1[$i]['ordercancel'];
$save['dc'] += $lines[$i]['od_dc_amount'];
$save['receiptbank'] += $lines[$i]['od_receipt_bank'];
$save['receiptcard'] += $lines[$i]['od_receipt_card'];
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
$save['receiptcancel'] += $lines[$i]['receiptcancel'];
$save['misu'] += $misu;
}
if ($i == 0) {
echo '<tr><td colspan="9" class="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
} else {
print_line($save);
}
?>
</tbody>
</table>
</section>

View File

@ -8,6 +8,49 @@ $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');
unset($tot);
$lines = $lines1 = array();
$sql = " select od_id,
mb_id,
od_name,
uq_id,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,10) = '$date'
order by od_id desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$lines[$i] = $row;
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$lines1[$i] = $row1;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receipt_bank'] += $row['od_receipt_bank'];
$tot['receipt_card'] += $row['od_receipt_card'];
$tot['receipt_point'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
?>
<style type="text/css">
.sale1{text-align:center}
@ -40,75 +83,6 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<th scope="col">미수금</th>
</tr>
</thead>
<tbody>
<?
unset($tot);
$sql = " select od_id,
mb_id,
od_name,
uq_id,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,10) = '$date'
order by od_id desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i > 0)
echo '<tr><td colspan="9"></td></tr>';
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
if ($row['mb_id'] == '') { // 비회원일 경우는 주문자로 링크
$href = "<a href='./orderlist.php?sel_field=od_name&search={$row['od_name']}'>";
} else { // 회원일 경우는 회원아이디로 링크
$href = "<a href='./orderlist.php?sel_field=mb_id&search={$row['mb_id']}'>";
}
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
?>
<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'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receipt_bank'] += $row['od_receipt_bank'];
$tot['receipt_card'] += $row['od_receipt_card'];
$tot['receipt_point'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
echo '<tr><td colspan="9" class="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
}
?>
</tbody>
<tfoot>
<tr>
<td colspan="2">합 계</td>
@ -121,11 +95,45 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<td><?=number_format($tot['misu'])?></td>
</tr>
</tfoot>
<tbody>
<?
unset($tot);
for ($i=0; $i<count($lines); $i++)
{
if ($i > 0)
echo '<tr><td colspan="9"></td></tr>';
if ($row['mb_id'] == '') { // 비회원일 경우는 주문자로 링크
$href = '<a href="./orderlist.php?sel_field=od_name&search='.$lines[$i]['od_name'].'">';
} else { // 회원일 경우는 회원아이디로 링크
$href = '<a href="./orderlist.php?sel_field=mb_id&search='.$lines[$i]['mb_id'].'">';
}
$misu = $lines1[$i]['orderamount'] - $lines1[$i]['ordercancel'] - $lines[$i]['od_dc_amount'] - $lines[$i]['receiptamount'] + $lines[$i]['receiptcancel'];
?>
<tr class="sale1">
<td><a href="./orderform.php?od_id=<?=$lines[$i]['od_id']?>"><?=$lines[$i]['od_id']?></a></td>
<td ><?=$href?><?=$lines[$i]['od_name']?></a></td>
<td><?=number_format($lines1[$i]['orderamount'])?></td>
<td><?=number_format($lines1[$i]['ordercancel'] + $lines[$i]['od_dc_amount'])?></td>
<td><?=number_format($lines[$i]['od_receipt_bank'])?></td>
<td><?=number_format($lines[$i]['od_receipt_card'])?></td>
<td><?=number_format($lines[$i]['od_receipt_point'])?></td>
<td><?=number_format($lines[$i]['receiptcancel'])?></td>
<td><?=number_format($misu)?></td>
</tr>
<?
}
if ($i == 0) {
echo '<tr><td colspan="9" class="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
}
?>
</tbody>
</table>
</section>
<?
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -29,6 +29,49 @@ function print_line($save)
</tr>
<?
}
$lines = $lines1 = array();
unset($save);
unset($tot);
$sql = " select uq_id,
SUBSTRING(od_time,1,4) as od_date,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,4) between '$fr_year' and '$to_year'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$lines[$i] = $row;
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$lines1[$i] = $row1;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
?>
<style type="text/css">
@ -61,73 +104,6 @@ function print_line($save)
<th scope="col">미수금</th>
</tr>
</thead>
<tbody>
<?
unset($save);
unset($tot);
$sql = " select uq_id,
SUBSTRING(od_time,1,4) as od_date,
od_send_cost,
od_receipt_bank,
od_receipt_card,
od_receipt_point,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,4) between '$fr_year' and '$to_year'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i == 0)
$save['od_date'] = $row['od_date'];
if ($save['od_date'] != $row['od_date']) {
print_line($save);
unset($save);
$save['od_date'] = $row['od_date'];
}
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from {$g4['yc4_cart_table']}
where uq_id = '{$row['uq_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$save['ordercount']++;
$save['orderamount'] += $row1['orderamount'];
$save['ordercancel'] += $row1['ordercancel'];
$save['dc'] += $row['od_dc_amount'];
$save['receiptbank'] += $row['od_receipt_bank'];
$save['receiptcard'] += $row['od_receipt_card'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['receiptcancel'] += $row['receiptcancel'];
$save['misu'] += $misu;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
echo '<tr><td colspan="9" calss="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
} else {
print_line($save);
}
?>
</tbody>
<tfoot>
<tr class="sale1">
<td>합 계</td>
@ -141,6 +117,41 @@ function print_line($save)
<td><?=number_format($tot['misu'])?></td>
</tr>
</tfoot>
<tbody>
<?
unset($save);
unset($tot);
for ($i=0; $i<count($lines); $i++)
{
if ($i == 0)
$save['od_date'] = $lines[$i]['od_date'];
if ($save['od_date'] != $lines[$i]['od_date']) {
print_line($save);
unset($save);
$save['od_date'] = $$lines[$i]['od_date'];
}
$misu = $lines1[$i]['orderamount'] - $lines1[$i]['ordercancel'] - $lines[$i]['od_dc_amount'] - $lines[$i]['receiptamount'] + $lines[$i]['receiptcancel'];
$save['ordercount']++;
$save['orderamount'] += $lines1[$i]['orderamount'];
$save['ordercancel'] += $lines1[$i]['ordercancel'];
$save['dc'] += $lines[$i]['od_dc_amount'];
$save['receiptbank'] += $lines[$i]['od_receipt_bank'];
$save['receiptcard'] += $lines[$i]['od_receipt_card'];
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
$save['receiptcancel'] += $lines[$i]['receiptcancel'];
$save['misu'] += $misu;
}
if ($i == 0) {
echo '<tr><td colspan="9" calss="sale1"><span>자료가 한건도 없습니다.</span></td></tr>';
} else {
print_line($save);
}
?>
</tbody>
</table>
</section>