#212 결제필드 간소화 작업 중
This commit is contained in:
@ -244,8 +244,8 @@ $pg_anchor = '<ul class="anchor">
|
||||
// 주문금액 = 상품구입금액 + 배송비
|
||||
$amount['정상'] = $t_ct_amount['정상'] + $od['od_send_cost'];
|
||||
|
||||
// 입금액 = 무통장(가상계좌, 계좌이체 포함) + 신용카드 + 휴대폰 + 포인트
|
||||
$amount['입금'] = $od['od_receipt_bank'] + $od['od_receipt_card'] + $od['od_receipt_hp'] + $od['od_receipt_point'];
|
||||
// 입금액 = 결제금액 + 포인트
|
||||
$amount['입금'] = $od['od_receipt_amount'] + $od['od_receipt_point'];
|
||||
|
||||
// 쿠폰금액
|
||||
$amount['쿠폰'] = $t_cp_amount + $od['od_coupon'];
|
||||
@ -325,7 +325,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row"><?php echo $od['od_settle_case']; ?> 입금액</th>
|
||||
<td><?php echo display_price($od['od_receipt_bank']); ?></td>
|
||||
<td><?php echo display_price($od['od_receipt_amount']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">입금자</th>
|
||||
@ -334,8 +334,8 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row">입금확인일시</th>
|
||||
<td>
|
||||
<?php if ($od['od_bank_time'] == 0) { ?>입금 확인일시를 체크해 주세요.
|
||||
<?php } else { ?><?php echo $od['od_bank_time']; ?> (<?php echo get_yoil($od['od_bank_time']); ?>)
|
||||
<?php if ($od['od_receipt_time'] == 0) { ?>입금 확인일시를 체크해 주세요.
|
||||
<?php } else { ?><?php echo $od['od_receipt_time']; ?> (<?php echo get_yoil($od['od_receipt_time']); ?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -348,13 +348,13 @@ $pg_anchor = '<ul class="anchor">
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php echo $od['od_settle_case']; ?> 결제액</th>
|
||||
<td><?php echo display_price($od['od_receipt_hp']); ?></td>
|
||||
<td><?php echo display_price($od['od_receipt_amount']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결제 확인일시</th>
|
||||
<td>
|
||||
<?php if ($od['od_hp_time'] == 0) { ?>결제 확인일시를 체크해 주세요.
|
||||
<?php } else { ?><?php echo $od['od_hp_time']; ?> (<?php echo get_yoil($od['od_hp_time']); ?>)
|
||||
<?php if ($od['od_receipt_time'] == 0) { ?>결제 확인일시를 체크해 주세요.
|
||||
<?php } else { ?><?php echo $od['od_receipt_time']; ?> (<?php echo get_yoil($od['od_receipt_time']); ?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -364,16 +364,16 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row" class="sodr_sppay">신용카드 입금액</th>
|
||||
<td>
|
||||
<?php if ($od['od_card_time'] == "0000-00-00 00:00:00") {?>0원
|
||||
<?php } else { ?><?php echo display_price($od['od_receipt_card']); ?>
|
||||
<?php if ($od['od_receipt_time'] == "0000-00-00 00:00:00") {?>0원
|
||||
<?php } else { ?><?php echo display_price($od['od_receipt_amount']); ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="sodr_sppay">카드 승인일시</th>
|
||||
<td>
|
||||
<?php if ($od['od_card_time'] == "0000-00-00 00:00:00") {?>신용카드 결제 일시 정보가 없습니다.
|
||||
<?php } else { ?><?php echo substr($od['od_card_time'], 0, 20); ?>
|
||||
<?php if ($od['od_receipt_time'] == "0000-00-00 00:00:00") {?>신용카드 결제 일시 정보가 없습니다.
|
||||
<?php } else { ?><?php echo substr($od['od_receipt_time'], 0, 20); ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -430,12 +430,12 @@ $pg_anchor = '<ul class="anchor">
|
||||
</tr>
|
||||
<?php
|
||||
if ($amount['미수'] == 0) {
|
||||
if ($od['od_receipt_bank']) {
|
||||
if ($od['od_receipt_amount'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체')) {
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">현금영수증</th>
|
||||
<td>
|
||||
<?php if ($od["od_cash"]) { ?>
|
||||
<?php if ($od['od_cash']) { ?>
|
||||
<a href="javascript:;" onclick="window.open('https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp?cash_no=<?php echo $od['od_cash_no']; ?>', 'taxsave_receipt', 'width=360,height=647,scrollbars=0,menus=0');">현금영수증 확인</a>
|
||||
<?php } else { ?>
|
||||
<a href="javascript:;" onclick="window.open('<?php echo G4_SHOP_URL; ?>/taxsave_kcp.php?od_id=<?php echo $od_id; ?>&uq_id=<?php echo $od['uq_id']; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');">현금영수증 발급</a>
|
||||
@ -476,7 +476,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
$str[$i] = str_replace("\r", "", $str[$i]);
|
||||
$bank_account .= '<option value="'.$str[$i].'" '.get_selected($od['od_bank_account'], $str[$i]).'>'.$str[$i].'</option>'.PHP_EOL;
|
||||
}
|
||||
$bank_account .= "</select> ";
|
||||
$bank_account .= '</select> ';
|
||||
}
|
||||
else if ($od['od_settle_case'] == '가상계좌')
|
||||
$bank_account = $od['od_bank_account'].'<input type="hidden" name="od_bank_account" value="'.$od['od_bank_account'].'">';
|
||||
@ -491,9 +491,9 @@ $pg_anchor = '<ul class="anchor">
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_receipt_bank"><?php echo $od['od_settle_case']; ?> 입금액</label></th>
|
||||
<th scope="row"><label for="od_receipt_amount"><?php echo $od['od_settle_case']; ?> 입금액</label></th>
|
||||
<td>
|
||||
<input type="text" name="od_receipt_bank" value="<?php echo $od['od_receipt_bank']; ?>" id="od_receipt_bank" class="frm_input" size="10"> 원
|
||||
<input type="text" name="od_receipt_amount" value="<?php echo $od['od_receipt_amount']; ?>" id="od_receipt_amount" class="frm_input" size="10"> 원
|
||||
<?php
|
||||
if ($od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌') {
|
||||
$pg_url = $g4['shop_cardpg'][$default['de_card_pg']];
|
||||
@ -514,11 +514,11 @@ $pg_anchor = '<ul class="anchor">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_bank_time">입금 확인일시</label></th>
|
||||
<th scope="row"><label for="od_receipt_time">입금 확인일시</label></th>
|
||||
<td>
|
||||
<label for="od_bank_chk">현재 시간으로 설정</label>
|
||||
<input type="checkbox" name="od_bank_chk" id="od_bank_chk" value="<?php echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>" onclick="if (this.checked == true) this.form.od_bank_time.value=this.form.od_bank_chk.value; else this.form.od_bank_time.value = this.form.od_bank_time.defaultValue;"><br>
|
||||
<input type="text" name="od_bank_time" value="<?php echo is_null_time($od['od_bank_time']) ? "" : $od['od_bank_time']; ?>" id="od_bank_time" class="frm_input" maxlength="19">
|
||||
<input type="checkbox" name="od_bank_chk" id="od_bank_chk" value="<?php echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>" onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_bank_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"><br>
|
||||
<input type="text" name="od_receipt_time" value="<?php echo is_null_time($od['od_receipt_time']) ? "" : $od['od_receipt_time']; ?>" id="od_receipt_time" class="frm_input" maxlength="19">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ########## 끝 ?>
|
||||
@ -529,39 +529,39 @@ $pg_anchor = '<ul class="anchor">
|
||||
<td><?php echo $od['od_escrow2']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="od_receipt_hp"><?php echo $od['od_settle_case']; ?> 결제액</label></th>
|
||||
<th scope="row"><label for="od_receipt_amount"><?php echo $od['od_settle_case']; ?> 결제액</label></th>
|
||||
<td>
|
||||
<input type="text" name="od_receipt_hp" value="<?php echo $od['od_receipt_hp']; ?>" id="od_receipt_hp" class="frm_input"> 원
|
||||
<input type="text" name="od_receipt_amount" value="<?php echo $od['od_receipt_amount']; ?>" id="od_receipt_amount" class="frm_input"> 원
|
||||
<?php $pg_url = $g4['shop_cardpg'][$default['de_card_pg']];?>
|
||||
<a href="<?php echo $pg_url; ?>" target="_blank">결제대행사</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="op_hp_time">휴대폰 결제일시</label></th>
|
||||
<th scope="row"><label for="op_receipt_time">휴대폰 결제일시</label></th>
|
||||
<td>
|
||||
<label for="od_card_chk">현재 시간으로 설정</label>
|
||||
<!-- name od_card_chk 를 od_hp_chk 로 수정 - 지운아빠 2013-04-16 -->
|
||||
<input type="checkbox" name="od_hp_chk" id="od_hp_chk" value="<?php echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>" onclick="if (this.checked == true) this.form.od_hp_time.value=this.form.od_card_chk.value; else this.form.od_hp_time.value = this.form.od_hp_time.defaultValue;"><br>
|
||||
<input type="text" name="od_hp_time" value="<?php echo is_null_time($od['od_hp_time']) ? "" : $od['od_hp_time']; ?>" id="op_hp_time" class="frm_input" size="19" maxlength="19">
|
||||
<input type="checkbox" name="od_hp_chk" id="od_hp_chk" value="<?php echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>" onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_hp_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"><br>
|
||||
<input type="text" name="od_receipt_time" value="<?php echo is_null_time($od['od_receipt_time']) ? "" : $od['od_receipt_time']; ?>" id="op_receipt_time" class="frm_input" size="19" maxlength="19">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($od['od_settle_case'] == '신용카드') { ?>
|
||||
<tr>
|
||||
<th scope="row" class="sodr_sppay"><label for="od_receipt_card">신용카드 결제액</label></th>
|
||||
<th scope="row" class="sodr_sppay"><label for="od_receipt_amount">신용카드 결제액</label></th>
|
||||
<td>
|
||||
<input type="text" name="od_receipt_card" value="<?php echo $od['od_receipt_card']; ?>" id="od_receipt_card" class="frm_input" size="10"> 원
|
||||
<input type="text" name="od_receipt_amount" value="<?php echo $od['od_receipt_amount']; ?>" id="od_receipt_amount" class="frm_input" size="10"> 원
|
||||
<?php $card_url = $g4['shop_cardpg'][$default['de_card_pg']]; ?>
|
||||
<a href="<?php echo $card_url; ?>" target="_blank">결제대행사</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="sodr_sppay"><label for="od_card_time">카드 승인일시</label></th>
|
||||
<th scope="row" class="sodr_sppay"><label for="od_receipt_time">카드 승인일시</label></th>
|
||||
<td>
|
||||
<label for="od_card_chk">현재 시간으로 설정</label>
|
||||
<input type="checkbox" name="od_card_chk" id="od_card_chk" value="<?php echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>" onclick="if (this.checked == true) this.form.od_card_time.value=this.form.od_card_chk.value; else this.form.od_card_time.value = this.form.od_card_time.defaultValue;"><br>
|
||||
<input type="text" name="od_card_time" value="<?php echo is_null_time($od['od_card_time']) ? "" : $od['od_card_time']; ?>" id="od_card_time" class="frm_input" size="19" maxlength="19">
|
||||
<input type="checkbox" name="od_card_chk" id="od_card_chk" value="<?php echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>" onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_card_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"><br>
|
||||
<input type="text" name="od_receipt_time" value="<?php echo is_null_time($od['od_receipt_time']) ? "" : $od['od_receipt_time']; ?>" id="od_receipt_time" class="frm_input" size="19" maxlength="19">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -185,26 +185,8 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($lines[$i]['od_temp_bank'] > 0 || $lines[$i]['od_receipt_bank'] > 0)
|
||||
{
|
||||
//$s_receipt_way = "무통장입금";
|
||||
$s_receipt_way = cut_str($lines[$i]['od_bank_account'],8,"");
|
||||
$s_br = "<br />";
|
||||
}
|
||||
|
||||
if ($lines[$i]['od_temp_card'] > 0 || $lines[$i]['od_receipt_card'] > 0)
|
||||
{
|
||||
// 미수금이 없고 카드결제를 하지 않았다면 카드결제를 선택후 무통장 입금한 경우임
|
||||
if ($lines[$i]['misuamount'] <= 0 && $lines[$i]['od_receipt_card'] == 0)
|
||||
; // 화면 출력하지 않음
|
||||
else
|
||||
{
|
||||
$s_receipt_way .= $s_br."카드";
|
||||
if ($lines[$i]['od_receipt_card'] == 0)
|
||||
$s_receipt_way .= "<span><span>(미승인)</span></span>";
|
||||
$s_br = "<br />";
|
||||
}
|
||||
}
|
||||
$s_receipt_way = '결제수단없음';
|
||||
$s_br = '<br />';
|
||||
}
|
||||
|
||||
if ($lines[$i]['od_receipt_point'] > 0)
|
||||
|
||||
@ -126,26 +126,8 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($row['od_temp_bank'] > 0 || $row['od_receipt_bank'] > 0)
|
||||
{
|
||||
//$s_receipt_way = "무통장입금";
|
||||
$s_receipt_way = cut_str($row['od_bank_account'],8,"");
|
||||
$s_br = "+";
|
||||
}
|
||||
|
||||
if ($row['od_temp_card'] > 0 || $row['od_receipt_card'] > 0)
|
||||
{
|
||||
// 미수금이 없고 카드결제를 하지 않았다면 카드결제를 선택후 무통장 입금한 경우임
|
||||
if ($row['misuamount'] <= 0 && $row['od_receipt_card'] == 0)
|
||||
; // 화면 출력하지 않음
|
||||
else
|
||||
{
|
||||
$s_receipt_way .= $s_br."카드";
|
||||
if ($row['od_receipt_card'] == 0)
|
||||
$s_receipt_way .= '<span class="small"><span class="point" style="font-size:8pt;">(미승인)</span></span>';
|
||||
$s_br = '<br>';
|
||||
}
|
||||
}
|
||||
$s_receipt_way = '결제수단없음';
|
||||
$s_br = '+';
|
||||
}
|
||||
|
||||
if ($row['od_receipt_point'] > 0)
|
||||
|
||||
@ -6,40 +6,24 @@ include_once(G4_LIB_PATH.'/icode.sms.lib.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
if ($od_bank_time)
|
||||
if ($od_receipt_time)
|
||||
{
|
||||
if (check_datetime($od_bank_time) == false)
|
||||
alert('무통장 입금일시 오류입니다.');
|
||||
}
|
||||
|
||||
if ($od_card_time)
|
||||
{
|
||||
if (check_datetime($od_card_time) == false)
|
||||
alert('신용카드 결제일시 오류입니다.');
|
||||
}
|
||||
|
||||
if ($od_hp_time)
|
||||
{
|
||||
if (check_datetime($od_hp_time) == false)
|
||||
alert("휴대폰 결제일시 오류입니다.");
|
||||
if (check_datetime($od_receipt_time) == false)
|
||||
alert('결제일시 오류입니다.');
|
||||
}
|
||||
|
||||
$sql = " update {$g4['shop_order_table']}
|
||||
set od_deposit_name = '$od_deposit_name',
|
||||
od_bank_account = '$od_bank_account',
|
||||
od_bank_time = '$od_bank_time',
|
||||
od_card_time = '$od_card_time',
|
||||
od_hp_time = '$od_hp_time',
|
||||
od_receipt_bank = '$od_receipt_bank',
|
||||
od_receipt_card = '$od_receipt_card',
|
||||
od_receipt_hp = '$od_receipt_hp',
|
||||
od_receipt_point = '$od_receipt_point',
|
||||
od_cancel_card = '$od_cancel_card',
|
||||
od_dc_amount = '$od_dc_amount',
|
||||
od_refund_amount = '$od_refund_amount',
|
||||
dl_id = '$dl_id',
|
||||
od_invoice = '$od_invoice',
|
||||
od_invoice_time = '$od_invoice_time' ";
|
||||
set od_deposit_name = '$od_deposit_name',
|
||||
od_bank_account = '$od_bank_account',
|
||||
od_receipt_time = '$od_bank_time',
|
||||
od_receipt_amount = '$od_receipt_amount',
|
||||
od_receipt_point = '$od_receipt_point',
|
||||
od_cancel_card = '$od_cancel_card',
|
||||
od_dc_amount = '$od_dc_amount',
|
||||
od_refund_amount = '$od_refund_amount',
|
||||
dl_id = '$dl_id',
|
||||
od_invoice = '$od_invoice',
|
||||
od_invoice_time = '$od_invoice_time' ";
|
||||
if (isset($od_send_cost))
|
||||
$sql .= " , od_send_cost = '$od_send_cost' ";
|
||||
$sql .= " where od_id = '$od_id' ";
|
||||
|
||||
@ -38,11 +38,11 @@ $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_settle_case,
|
||||
od_receipt_amount,
|
||||
od_receipt_point,
|
||||
od_dc_amount,
|
||||
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
|
||||
(od_receipt_amount + od_receipt_point) as receiptamount,
|
||||
(od_refund_amount + od_cancel_card) as receiptcancel
|
||||
from {$g4['shop_order_table']}
|
||||
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
|
||||
@ -67,8 +67,10 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$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'];
|
||||
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
|
||||
$tot['receiptbank'] += $row['od_receipt_amount'];
|
||||
if($row['od_settle_case'] == '신용카드')
|
||||
$tot['receiptcard'] += $row['od_receipt_amount'];
|
||||
$tot['receiptpoint '] += $row['od_receipt_point'];
|
||||
$tot['receiptamount'] += $row['receiptamount'];
|
||||
$tot['receiptcancel'] += $row['receiptcancel'];
|
||||
@ -127,8 +129,10 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$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'];
|
||||
if($lines[$i]['od_settle_case'] == '무통장' || $lines[$i]['od_settle_case'] == '가상계좌' || $lines[$i]['od_settle_case'] == '계좌이체')
|
||||
$save['receiptbank'] += $lines[$i]['od_receipt_amount'];
|
||||
if($lines[$i]['od_settle_case'] == '신용카드')
|
||||
$save['receiptcard'] += $lines[$i]['od_receipt_amount'];
|
||||
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
|
||||
$save['receiptcancel'] += $lines[$i]['receiptcancel'];
|
||||
$save['misu'] += $misu;
|
||||
|
||||
@ -38,11 +38,11 @@ $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_settle_case,
|
||||
od_receipt_amount,
|
||||
od_receipt_point,
|
||||
od_dc_amount,
|
||||
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
|
||||
(od_receipt_amount + od_receipt_point) as receiptamount,
|
||||
(od_refund_amount + od_cancel_card) as receiptcancel
|
||||
from {$g4['shop_order_table']}
|
||||
where SUBSTRING(od_time,1,7) between '$fr_month' and '$to_month'
|
||||
@ -67,8 +67,10 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$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'];
|
||||
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
|
||||
$tot['receiptbank'] += $row['od_receipt_amount'];
|
||||
if($row['od_settle_case'] == '신용카드')
|
||||
$tot['receiptcard'] += $row['od_receipt_amount'];
|
||||
$tot['receiptpoint'] += $row['od_receipt_point'];
|
||||
$tot['receiptamount'] += $row['receiptamount'];
|
||||
$tot['receiptcancel'] += $row['receiptcancel'];
|
||||
@ -127,8 +129,10 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$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'];
|
||||
if($lines[$i]['od_settle_case'] == '무통장' || $lines[$i]['od_settle_case'] == '가상계좌' || $lines[$i]['od_settle_case'] == '계좌이체')
|
||||
$save['receiptbank'] += $lines[$i]['od_receipt_amount'];
|
||||
if($lines[$i]['od_settle_case'] == '신용카드')
|
||||
$save['receiptcard'] += $lines[$i]['od_receipt_amount'];
|
||||
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
|
||||
$save['receiptcancel'] += $lines[$i]['receiptcancel'];
|
||||
$save['misu'] += $misu;
|
||||
|
||||
@ -16,11 +16,11 @@ $sql = " select od_id,
|
||||
od_name,
|
||||
uq_id,
|
||||
od_send_cost,
|
||||
od_receipt_bank,
|
||||
od_receipt_card,
|
||||
od_settle_case,
|
||||
od_receipt_amount,
|
||||
od_receipt_point,
|
||||
od_dc_amount,
|
||||
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
|
||||
(od_receipt_amount + od_receipt_point) as receiptamount,
|
||||
(od_refund_amount + od_cancel_card) as receiptcancel
|
||||
from {$g4['shop_order_table']}
|
||||
where SUBSTRING(od_time,1,10) = '$date'
|
||||
@ -44,8 +44,10 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$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'];
|
||||
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
|
||||
$tot['receipt_bank'] += $row['od_receipt_amount'];
|
||||
if($row['od_settle_case'] == '신용카드')
|
||||
$tot['receipt_card'] += $row['od_receipt_amount'];
|
||||
$tot['receipt_point'] += $row['od_receipt_point'];
|
||||
$tot['receiptamount'] += $row['receiptamount'];
|
||||
$tot['receiptcancel'] += $row['receiptcancel'];
|
||||
@ -74,7 +76,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
<tr>
|
||||
<td colspan="2">합 계</td>
|
||||
<td><?php echo number_format($tot['orderamount']); ?></td>
|
||||
<td><?php echo number_format($tot['ordercancel']+ $tot['dc']); ?></td>
|
||||
<td><?php echo number_format($tot['ordercancel'] + $tot['dc']); ?></td>
|
||||
<td><?php echo number_format($tot['receipt_bank']); ?></td>
|
||||
<td><?php echo number_format($tot['receipt_card']); ?></td>
|
||||
<td><?php echo number_format($tot['receipt_point']); ?></td>
|
||||
@ -95,14 +97,20 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
|
||||
$misu = $lines1[$i]['orderamount'] - $lines1[$i]['ordercancel'] - $lines[$i]['od_dc_amount'] - $lines[$i]['receiptamount'] + $lines[$i]['receiptcancel'];
|
||||
|
||||
$receipt_bank = $receipt_card = 0;
|
||||
if($lines[$i]['od_settle_case'] == '무통장' || $lines[$i]['od_settle_case'] == '가상계좌' || $lines[$i]['od_settle_case'] == '계좌이체')
|
||||
$receipt_bank = $lines[$i]['od_receipt_amount'];
|
||||
if($lines[$i]['od_settle_case'] == '신용카드')
|
||||
$receipt_card = $lines[$i]['od_receipt_amount'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_odrnum2"><a href="./orderform.php?od_id=<?php echo $lines[$i]['od_id']; ?>"><?php echo $lines[$i]['od_id']; ?></a></td>
|
||||
<td class="td_name"><?php echo $href; ?><?php echo $lines[$i]['od_name']; ?></a></td>
|
||||
<td class="td_num"><?php echo number_format($lines1[$i]['orderamount']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($lines1[$i]['ordercancel'] + $lines[$i]['od_dc_amount']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($lines[$i]['od_receipt_bank']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($lines[$i]['od_receipt_card']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($receipt_bank); ?></td>
|
||||
<td class="td_num"><?php echo number_format($receipt_card); ?></td>
|
||||
<td class="td_num"><?php echo number_format($lines[$i]['od_receipt_point']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($lines[$i]['receiptcancel']); ?></td>
|
||||
<td class="td_num"><?php echo number_format($misu); ?></td>
|
||||
|
||||
@ -33,11 +33,11 @@ unset($tot);
|
||||
$sql = " select uq_id,
|
||||
SUBSTRING(od_time,1,4) as od_date,
|
||||
od_send_cost,
|
||||
od_receipt_bank,
|
||||
od_receipt_card,
|
||||
od_settle_case,
|
||||
od_receipt_amount,
|
||||
od_receipt_point,
|
||||
od_dc_amount,
|
||||
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
|
||||
(od_receipt_amount + od_receipt_point) as receiptamount,
|
||||
(od_refund_amount + od_cancel_card) as receiptcancel
|
||||
from {$g4['shop_order_table']}
|
||||
where SUBSTRING(od_time,1,4) between '$fr_year' and '$to_year'
|
||||
@ -62,8 +62,10 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$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'];
|
||||
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
|
||||
$tot['receiptbank'] += $row['od_receipt_amount'];
|
||||
if($row['od_settle_case'] == '신용카드')
|
||||
$tot['receiptcard'] += $row['od_receipt_amount'];
|
||||
$tot['receiptpoint'] += $row['od_receipt_point'];
|
||||
$tot['receiptamount'] += $row['receiptamount'];
|
||||
$tot['receiptcancel'] += $row['receiptcancel'];
|
||||
@ -122,8 +124,10 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$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'];
|
||||
if($lines[$i]['od_settle_case'] == '무통장' || $lines[$i]['od_settle_case'] == '가상계좌' || $lines[$i]['od_settle_case'] == '계좌이체')
|
||||
$save['receiptbank'] += $lines[$i]['od_receipt_amount'];
|
||||
if($lines[$i]['od_settle_case'] == '신용카드')
|
||||
$save['receiptcard'] += $lines[$i]['od_receipt_amount'];
|
||||
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
|
||||
$save['receiptcancel'] += $lines[$i]['receiptcancel'];
|
||||
$save['misu'] += $misu;
|
||||
|
||||
Reference in New Issue
Block a user