amount 필드명 price 로 변경

This commit is contained in:
chicpro
2013-09-11 15:52:33 +09:00
parent a61215ad14
commit 97cf079a0f
60 changed files with 837 additions and 805 deletions

View File

@ -107,9 +107,9 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
</td>
</tr>
<tr>
<th scope="row"><label for="cp_amount"><?php echo $cp['cp_type'] ? '할인비율' : '할인금액'; ?></label></th>
<th scope="row"><label for="cp_price"><?php echo $cp['cp_type'] ? '할인비율' : '할인금액'; ?></label></th>
<td>
<input type="text" name="cp_amount" value="<?php echo stripslashes($cp['cp_amount']); ?>" id="cp_amount" required class="frm_input required"> <span id="cp_amount_unit"><?php echo $cp['cp_type'] ? '%' : '원'; ?></span>
<input type="text" name="cp_price" value="<?php echo stripslashes($cp['cp_price']); ?>" id="cp_price" required class="frm_input required"> <span id="cp_price_unit"><?php echo $cp['cp_type'] ? '%' : '원'; ?></span>
</td>
</tr>
<tr id="tr_cp_trunc">
@ -212,13 +212,13 @@ function change_method(cp_method)
function change_type(cp_type)
{
if(cp_type == "0") {
$("#cp_amount_unit").text("원");
$("#cp_amount_unit").closest("tr").find("label").text("할인금액");
$("#cp_price_unit").text("원");
$("#cp_price_unit").closest("tr").find("label").text("할인금액");
$("#tr_cp_maximum").hide();
$("#tr_cp_trunc").hide();
} else {
$("#cp_amount_unit").text("%");
$("#cp_amount_unit").closest("tr").find("label").text("할인비율");
$("#cp_price_unit").text("%");
$("#cp_price_unit").closest("tr").find("label").text("할인비율");
$("#tr_cp_maximum").show();
$("#tr_cp_trunc").show();
}
@ -228,14 +228,14 @@ function form_check(f)
{
var sel_type = f.cp_type;
var cp_type = sel_type.options[sel_type.selectedIndex].value;
var cp_amount = f.cp_amount.value;
var cp_price = f.cp_price.value;
if(!f.chk_all_mb.checked && f.mb_id.value == "") {
alert("회원아이디를 입력해 주십시오.");
return false;
}
if(isNaN(cp_amount)) {
if(isNaN(cp_price)) {
if(cp_type == "1")
alert("할인비율을 숫자로 입력해 주십시오.");
else
@ -244,9 +244,9 @@ function form_check(f)
return false;
}
cp_amount = parseInt(cp_amount);
cp_price = parseInt(cp_price);
if(cp_type == "1" && (cp_amount < 1 || cp_amount > 99)) {
if(cp_type == "1" && (cp_price < 1 || cp_price > 99)) {
alert("할인비율을 1과 99 사이의 숫자로 입력해 주십시오.");
return false;
}

View File

@ -27,14 +27,14 @@ if($_POST['cp_start'] > $_POST['cp_end'])
if($_POST['cp_end'] < G4_TIME_YMD)
alert('종료일은 오늘('.G4_TIME_YMD.')이후로 입력해 주십시오.');
if(!$_POST['cp_amount']) {
if(!$_POST['cp_price']) {
if($_POST['cp_type'])
alert('할인비율을 입력해 주십시오.');
else
alert('할인금액을 입력해 주십시오.');
}
if($_POST['cp_type'] && ($_POST['cp_amount'] < 1 || $_POST['cp_amount'] > 99))
if($_POST['cp_type'] && ($_POST['cp_price'] < 1 || $_POST['cp_price'] > 99))
alert('할인비율을은 1과 99사이 값으로 입력해 주십시오.');
if($_POST['cp_method'] == 0) {
@ -94,9 +94,9 @@ if($w == '') {
} while(1);
$sql = " INSERT INTO {$g4['shop_coupon_table']}
( cp_id, cp_subject, cp_method, cp_target, mb_id, cp_start, cp_end, cp_type, cp_amount, cp_trunc, cp_minimum, cp_maximum, cp_used, cp_datetime )
( cp_id, cp_subject, cp_method, cp_target, mb_id, cp_start, cp_end, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum, cp_used, cp_datetime )
VALUES
( '$cp_id', '$cp_subject', '$cp_method', '$cp_target', '$mb_id', '$cp_start', '$cp_end', '$cp_type', '$cp_amount', '$cp_trunc', '$cp_minimum', '$cp_maximum', '$cp_used', '".G4_TIME_YMDHIS."' ) ";
( '$cp_id', '$cp_subject', '$cp_method', '$cp_target', '$mb_id', '$cp_start', '$cp_end', '$cp_type', '$cp_price', '$cp_trunc', '$cp_minimum', '$cp_maximum', '$cp_used', '".G4_TIME_YMDHIS."' ) ";
sql_query($sql);
}
@ -115,7 +115,7 @@ if($w == '') {
cp_start = '$cp_start',
cp_end = '$cp_end',
cp_type = '$cp_type',
cp_amount = '$cp_amount',
cp_price = '$cp_price',
cp_trunc = '$cp_trunc',
cp_maximum = '$cp_maximum',
cp_minimum = '$cp_minimum'

View File

@ -38,7 +38,7 @@ $sql_common = " from {$g4['shop_order_table']}
// 테이블의 전체 레코드수만 얻음
if ($chk_misu) {
$sql = " select *, "._MISU_QUERY_." $sql_common having misu <= 0 ";
$sql = " select * $sql_common where od_misu <= 0 ";
$result = sql_query($sql);
$total_count = mysql_num_rows($result);
}
@ -85,7 +85,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</span>
<label for="chk_misu">미수금없음</label>
<input type="checkbox" name="chk_misu" value="1" id="chk_misu" <?php echo $chk_misu?"checked='checked'":""; ?> />
<input type="checkbox" name="chk_misu" value="1" id="chk_misu" <?php echo $chk_misu?'checked="checked"':''; ?> />
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field">
@ -103,17 +103,17 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<section class="cbox">
<h2>배송내역</h2>
<ul>
<li>주문액은 취소, 반품, 품절, DC가 포함된 금액이 아닙니다.</li>
<li>입금액은 환불, 승인취소가 포함된 금액이 아닙니다.</li>
<li>주문액은 취소, 반품, 품절 포함된 금액이 아닙니다.</li>
<li>입금액은 환불/취소가 포함된 금액이 아닙니다.</li>
<li>배송일시, 배송회사는 입력의 편의성을 위하여 기본값으로 설정되어 있습니다. 운송장번호만 없는것이 미배송 주문자료입니다.</li>
</ul>
<ul class="sort_odr">
<li><a href="<?php echo title_sort("od_id",1) . "&amp;$qstr1"; ?>">주문번호<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_name") . "&amp;$qstr1"; ?>">주문자<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_amount",1) . "&amp;$qstr1"; ?>">주문액<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_receipt_amount",1) . "&amp;$qstr1"; ?>">입금액<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("misu",1) . "&amp;$qstr1"; ?>">미수금<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_price",1) . "&amp;$qstr1"; ?>">주문액<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_receipt_price",1) . "&amp;$qstr1"; ?>">입금액<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_misu",1) . "&amp;$qstr1"; ?>">미수금<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_hope_date",1) . "&amp;$qstr1"; ?>">희망배송일<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_invoice_time") . "&amp;$qstr1"; ?>">배송일시<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_invoice", 1) . "&amp;$qstr1"; ?>">운송장번호<span class="sound_only"> 순 정렬</span></a></li>
@ -143,10 +143,10 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</thead>
<tbody>
<?php
$sql = " select *, "._MISU_QUERY_."
$sql = " select *
$sql_common ";
if ($chk_misu)
$sql .= " having misu <= 0 ";
$sql .= " where od_misu <= 0 ";
$sql .= " order by $sort1 $sort2
limit $from_record, {$config['cf_page_rows']} ";
$result = sql_query($sql);
@ -173,9 +173,9 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>"><?php echo $row['od_id']; ?></a>
</td>
<td class="td_name"><?php echo $row['od_name']; ?></td>
<td><?php echo display_price($row['od_cart_amount']); ?></td>
<td><?php echo display_price($row['od_receipt_amount']); ?></td>
<td><?php echo display_price($row['misu']); ?></td>
<td><?php echo display_price($row['od_cart_price']); ?></td>
<td><?php echo display_price($row['od_receipt_price']); ?></td>
<td><?php echo display_price($row['od_misu']); ?></td>
<td><?php echo $hope_date; ?></td>
<td><input type="text" name="od_invoice_time[<?php echo $i; ?>]" value="<?php echo $invoice_time; ?>" class="frm_input" size="20" maxlength="19"></td>
<td>

View File

@ -32,9 +32,9 @@ $pg_anchor = '<ul class="anchor">
<tbody>
<?php
// 미수금이 없고 운송장번호가 없는 자료를 구함
$sql = " select *, "._MISU_QUERY_."
$sql = " select *
from {$g4['shop_order_table']}
having misu <= 0 and od_invoice = ''
where od_receipt_price > 0 and od_misu <= 0 and od_invoice = ''
order by od_id desc
limit $max_limit ";
$result = sql_query($sql);
@ -59,7 +59,7 @@ $pg_anchor = '<ul class="anchor">
<tr>
<td class="td_odrnum2"><?php echo $row['od_id']; ?></td>
<td class="td_name"><?php echo $name; ?></td>
<td class="td_bignum"><?php echo display_price($row['od_receipt_amount']); ?></td>
<td class="td_bignum"><?php echo display_price($row['od_receipt_price']); ?></td>
<td class="td_payby"><?php echo $settle_method; ?></td>
<td class="td_smallmng"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>">수정</a></td>
</tr>
@ -92,9 +92,9 @@ $pg_anchor = '<ul class="anchor">
<tbody>
<?php
// 미수금이 있고 송장번호가 없는 자료를 구함
$sql = " select *, "._MISU_QUERY_."
$sql = " select *
from {$g4['shop_order_table']}
having misu > 0
where od_misu > 0
order by od_id desc
limit $max_limit ";
$result = sql_query($sql);

View File

@ -898,10 +898,10 @@ $(function(){
</td>
</tr>
<tr>
<th scope="row"><label for="it_sc_amount">기본배송비</label></th>
<th scope="row"><label for="it_sc_price">기본배송비</label></th>
<td>
<?php echo help("무료배송 이외의 설정에 적용되는 배송비 금액입니다."); ?>
<input type="text" name="it_sc_amount" value="<?php echo $it['it_sc_amount']; ?>" id="it_sc_amount" class="frm_input" size="8"> 원
<input type="text" name="it_sc_price" value="<?php echo $it['it_sc_price']; ?>" id="it_sc_price" class="frm_input" size="8"> 원
</td>
</tr>
<tr id="sc_con_minimum">
@ -1426,7 +1426,7 @@ function fitemformcheck(f)
}
if(f.it_sc_type.value != "0") {
if(!f.it_sc_amount.value || f.it_sc_amount.value == "0") {
if(!f.it_sc_price.value || f.it_sc_price.value == "0") {
alert("기본배송비를 입력해 주십시오.");
return false;
}

View File

@ -287,7 +287,7 @@ $sql_common = " ca_id = '$ca_id',
it_stock_qty = '$it_stock_qty',
it_sc_type = '$it_sc_type',
it_sc_method = '$it_sc_method',
it_sc_amount = '$it_sc_amount',
it_sc_price = '$it_sc_price',
it_sc_minimum = '$it_sc_minimum',
it_sc_qty = '$it_sc_qty',
it_head_html = '$it_head_html',
@ -438,7 +438,7 @@ if(is_checked('chk_ca_it_cust_price')) $ca_fields .= " , it_cust_price
if(is_checked('chk_ca_it_point')) $ca_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_ca_it_point_type')) $ca_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_ca_it_stock_qty')) $ca_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_ca_it_sendcost')) $ca_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_amount = '$it_sc_amount', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_ca_it_sendcost')) $ca_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_ca_it_gallery')) $ca_fields .= " , it_gallery = '$it_gallery' ";
if(is_checked('chk_ca_it_head_html')) $ca_fields .= " , it_head_html = '$it_head_html' ";
if(is_checked('chk_ca_it_tail_html')) $ca_fields .= " , it_tail_html = '$it_tail_html' ";
@ -472,7 +472,7 @@ if(is_checked('chk_all_it_cust_price')) $all_fields .= " , it_cust_pric
if(is_checked('chk_all_it_point')) $all_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_all_it_point_type')) $all_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_all_it_stock_qty')) $all_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_all_it_sendcost')) $all_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_amount = '$it_sc_amount', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_all_it_sendcost')) $all_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_all_it_gallery')) $all_fields .= " , it_gallery = '$it_gallery' ";
if(is_checked('chk_all_it_head_html')) $all_fields .= " , it_head_html = '$it_head_html' ";
if(is_checked('chk_all_it_tail_html')) $all_fields .= " , it_tail_html = '$it_tail_html' ";

View File

@ -158,7 +158,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
<thead>
<tr>
<th scope="col" rowspan="2">
<label for="chkall" class="sound_only">게시판 전체</label>
<label for="chkall" class="sound_only">상품 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col" rowspan="2">상품코드</th>

View File

@ -86,7 +86,7 @@ if ($default['de_card_test']) {
// 상품목록
$sql = " select it_id,
it_name,
cp_amount,
cp_price,
ct_notax
from {$g4['shop_cart_table']}
where od_id = '{$od['od_id']}'
@ -108,7 +108,7 @@ $pg_anchor = '<ul class="anchor">
<section id="anc_sodr_list" class="cbox">
<h2>주문상품 목록</h2>
<?php echo $pg_anchor; ?>
<p>주문일시 <?php echo substr($od['od_time'],0,16); ?> (<?php echo get_yoil($od['od_time']); ?>) / 주문총액 <strong><?php echo number_format($od['od_cart_amount'] + $od['od_send_cost'] + $od['od_send_cost2']); ?></strong>원</p>
<p>주문일시 <?php echo substr($od['od_time'],0,16); ?> (<?php echo get_yoil($od['od_time']); ?>) / 주문총액 <strong><?php echo number_format($od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2']); ?></strong>원</p>
<?php if ($default['de_hope_date_use']) { ?><p>희망배송일은 <?php echo $od['od_hope_date']; ?> (<?php echo get_yoil($od['od_hope_date']); ?>) 입니다.</p><?php } ?>
<?php if($od['od_mobile']) { ?>
<p>모바일 쇼핑몰의 주문입니다.</p>
@ -161,7 +161,7 @@ $pg_anchor = '<ul class="anchor">
<tbody>
<?php
// 상품의 옵션정보
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, cp_amount, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, cp_price, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
from {$g4['shop_cart_table']}
where od_id = '{$od['od_id']}'
and it_id = '{$row['it_id']}'
@ -174,7 +174,7 @@ $pg_anchor = '<ul class="anchor">
else
$opt_price = $opt['ct_price'] + $opt['io_price'];
$ct_amount['소계'] = $opt_price * $opt['ct_qty'];
$ct_price['소계'] = $opt_price * $opt['ct_qty'];
$ct_point['소계'] = $opt['ct_point'] * $opt['ct_qty'];
?>
<tr>
@ -190,7 +190,7 @@ $pg_anchor = '<ul class="anchor">
<input type="text" name="ct_qty[<?php echo $chk_cnt; ?>]" id="ct_qty_<?php echo $chk_cnt; ?>" value="<?php echo $opt['ct_qty']; ?>" required class="frm_input required" size="5">
</td>
<td class="td_bignum"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($ct_amount['소계']); ?></td>
<td class="td_num"><?php echo number_format($ct_price['소계']); ?></td>
<td class="td_bignum"><?php echo number_format($ct_point['소계']); ?></td>
<td class="td_sendcost_by"><?php echo $opt['ct_send_cost'] ? '착불' : '선불'; ?></td>
<td class="td_smallmng"><?php echo get_yn($opt['ct_point_use']); ?></td>
@ -239,16 +239,16 @@ $pg_anchor = '<ul class="anchor">
<?php
// 주문금액 = 상품구입금액 + 배송비 + 추가배송비
$amount['주문'] = $od['od_cart_amount'] + $od['od_send_cost'] + $od['od_send_cost2'];
$amount['주문'] = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2'];
// 입금액 = 결제금액 + 포인트
$amount['입금'] = $od['od_receipt_amount'] + $od['od_receipt_point'];
$amount['입금'] = $od['od_receipt_price'] + $od['od_receipt_point'];
// 쿠폰금액
$amount['쿠폰'] = $od['od_cart_coupon'] + $od['od_coupon'] + $od['od_send_coupon'];
// 취소금액
$amount['취소'] = $od['od_cancel_amount'];
$amount['취소'] = $od['od_cancel_price'];
// 미수금 = 주문금액 - 취소금액 - 입금금액 - 쿠폰금액
$amount['미수'] = $amount['주문'] - $amount['입금'] - $amount['쿠폰'];
@ -322,7 +322,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_amount']); ?></td>
<td><?php echo display_price($od['od_receipt_price']); ?></td>
</tr>
<tr>
<th scope="row">입금자</th>
@ -345,7 +345,7 @@ $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_amount']); ?></td>
<td><?php echo display_price($od['od_receipt_price']); ?></td>
</tr>
<tr>
<th scope="row">결제 확인일시</th>
@ -362,7 +362,7 @@ $pg_anchor = '<ul class="anchor">
<th scope="row" class="sodr_sppay">신용카드 입금액</th>
<td>
<?php if ($od['od_receipt_time'] == "0000-00-00 00:00:00") {?>0원
<?php } else { ?><?php echo display_price($od['od_receipt_amount']); ?>
<?php } else { ?><?php echo display_price($od['od_receipt_price']); ?>
<?php } ?>
</td>
</tr>
@ -395,7 +395,7 @@ $pg_anchor = '<ul class="anchor">
</tr>
<tr>
<th scope="row">취소/환불액</th>
<td><?php echo display_price($od['od_cancel_amount']); ?></td>
<td><?php echo display_price($od['od_cancel_price']); ?></td>
</tr>
<?php
$sql = " select dl_company, dl_url, dl_tel from {$g4['shop_delivery_table']} where dl_id = '{$od['dl_id']}' ";
@ -422,7 +422,7 @@ $pg_anchor = '<ul class="anchor">
<?php } ?>
<tr>
<th scope="row">배송일시</th>
<td><?php echo $od['od_invoice_time']; ?></td>
<td><?php echo is_null_time($od['od_invoice_time']) ? $od['od_invoice_time'] : ''; ?></td>
</tr>
<tr>
<th scope="row"><label for="od_send_cost">배송비</label></th>
@ -445,7 +445,7 @@ $pg_anchor = '<ul class="anchor">
</tr>
<?php
if ($amount['미수'] == 0) {
if ($od['od_receipt_amount'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체')) {
if ($od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체')) {
?>
<tr>
<th scope="row">현금영수증</th>
@ -506,9 +506,9 @@ $pg_anchor = '<ul class="anchor">
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="od_receipt_amount"><?php echo $od['od_settle_case']; ?> 입금액</label></th>
<th scope="row"><label for="od_receipt_price"><?php echo $od['od_settle_case']; ?> 입금액</label></th>
<td>
<input type="text" name="od_receipt_amount" value="<?php echo $od['od_receipt_amount']; ?>" id="od_receipt_amount" class="frm_input" size="10"> 원
<input type="text" name="od_receipt_price" value="<?php echo $od['od_receipt_price']; ?>" id="od_receipt_price" class="frm_input" size="10"> 원
<?php
if ($od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌') {
$pg_url = $g4['shop_cardpg'][$default['de_card_pg']];
@ -544,9 +544,9 @@ $pg_anchor = '<ul class="anchor">
<td><?php echo $od['od_bank_account']; ?></td>
</tr>
<tr>
<th scope="row"><label for="od_receipt_amount"><?php echo $od['od_settle_case']; ?> 결제액</label></th>
<th scope="row"><label for="od_receipt_price"><?php echo $od['od_settle_case']; ?> 결제액</label></th>
<td>
<input type="text" name="od_receipt_amount" value="<?php echo $od['od_receipt_amount']; ?>" id="od_receipt_amount" class="frm_input"> 원
<input type="text" name="od_receipt_price" value="<?php echo $od['od_receipt_price']; ?>" id="od_receipt_price" class="frm_input"> 원
<?php $pg_url = $g4['shop_cardpg'][$default['de_card_pg']];?>
<a href="<?php echo $pg_url; ?>" target="_blank">결제대행사</a>
</td>
@ -563,9 +563,9 @@ $pg_anchor = '<ul class="anchor">
<?php if ($od['od_settle_case'] == '신용카드') { ?>
<tr>
<th scope="row" class="sodr_sppay"><label for="od_receipt_amount">신용카드 결제액</label></th>
<th scope="row" class="sodr_sppay"><label for="od_receipt_price">신용카드 결제액</label></th>
<td>
<input type="text" name="od_receipt_amount" value="<?php echo $od['od_receipt_amount']; ?>" id="od_receipt_amount" class="frm_input" size="10"> 원
<input type="text" name="od_receipt_price" value="<?php echo $od['od_receipt_price']; ?>" id="od_receipt_price" 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>
@ -585,9 +585,9 @@ $pg_anchor = '<ul class="anchor">
<td><input type="text" name="od_receipt_point" value="<?php echo $od['od_receipt_point']; ?>" id="od_receipt_point" class="frm_input" size="10"> 점</td>
</tr>
<tr>
<th scope="row"><label for="od_cancel_amount">취소/환불 금액</label></th>
<th scope="row"><label for="od_cancel_price">취소/환불 금액</label></th>
<td>
<input type="text" name="od_cancel_amount" value="<?php echo $od['od_cancel_amount']; ?>" class="frm_input" size="10"> 원
<input type="text" name="od_cancel_price" value="<?php echo $od['od_cancel_price']; ?>" class="frm_input" size="10"> 원
</td>
</tr>
<tr>

View File

@ -37,7 +37,7 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *, "._MISU_QUERY_."
$sql = " select *
$sql_common
order by $sort1 $sort2
limit $from_record, $rows ";
@ -99,11 +99,11 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<li><a href="<?php echo title_sort("od_id", 1)."&amp;$qstr1"; ?>">주문번호<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_name")."&amp;$qstr1"; ?>">주문자<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("mb_id")."&amp;$qstr1"; ?>">회원ID<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_count", 1)."&amp;$qstr1"; ?>">건수<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_amount", 1)."&amp;$qstr1"; ?>">주문합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cancel_amount", 1)."&amp;$qstr1"; ?>">주문취소<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_receipt_amount")."&amp;$qstr1"; ?>">입금합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("misu", 1)."&amp;$qstr1"; ?>">미수금<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_price", 1)."&amp;$qstr1"; ?>">건수<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_price", 1)."&amp;$qstr1"; ?>">주문합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cancel_price", 1)."&amp;$qstr1"; ?>">주문취소<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_receipt_price")."&amp;$qstr1"; ?>">입금합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_misu", 1)."&amp;$qstr1"; ?>">미수금<span class="sound_only"> 순 정렬</span></a></li>
</ul>
<table id="sodr_list">
@ -173,11 +173,11 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</a>
</td>
<td class="td_sodr_cnt"><b><?php echo $row['od_cart_count']; ?></b>건<?php if($od_cnt) { ?><br>누적 <?php echo $od_cnt; ?>건<?php } ?></td>
<td class="td_sodr_sum"><?php echo number_format($row['od_cart_amount']); ?></td>
<td><?php echo number_format($row['od_receipt_amount']); ?></td>
<td><?php echo number_format($row['od_cancel_amount']); ?></td>
<td class="td_sodr_sum"><?php echo number_format($row['od_cart_price']); ?></td>
<td><?php echo number_format($row['od_receipt_price']); ?></td>
<td><?php echo number_format($row['od_cancel_price']); ?></td>
<td class="td_sodr_sum"><?php echo number_format($row['couponamount']); ?></td>
<td class="td_sodr_nonpay"><?php echo number_format($row['misu']); ?></td>
<td class="td_sodr_nonpay"><?php echo number_format($row['od_misu']); ?></td>
<td><?php echo $s_receipt_way; ?></td>
<td class="td_mng">
<a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>&amp;<?php echo $qstr; ?>"><span class="sound_only"><?php echo $row['od_id']; ?> </span>수정</a>
@ -186,11 +186,11 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</tr>
<?php
$tot_itemcount += $row['od_cart_count'];
$tot_orderamount += $row['od_cart_amount'];
$tot_ordercancel += $row['od_cancel_amount'];
$tot_receiptamount += $row['od_receipt_amount'];
$tot_orderprice += $row['od_cart_price'];
$tot_ordercancel += $row['od_cancel_price'];
$tot_receiptprice += $row['od_receipt_price'];
$tot_couponamount += $row['couponamount'];
$tot_misu += $row['misu'];
$tot_misu += $row['od_misu'];
}
mysql_free_result($result);
if ($i == 0)
@ -201,8 +201,8 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<tr class="orderlist">
<th scope="row" colspan="2">합 계</td>
<td><?php echo (int)$tot_itemcount; ?>건</td>
<td><?php echo number_format($tot_orderamount); ?></td>
<td><?php echo number_format($tot_receiptamount); ?></td>
<td><?php echo number_format($tot_orderprice); ?></td>
<td><?php echo number_format($tot_receiptprice); ?></td>
<td><?php echo number_format($tot_ordercancel); ?></td>
<td><?php echo number_format($tot_couponamount); ?></td>
<td><?php echo number_format($tot_misu); ?></td>

View File

@ -37,7 +37,7 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *, "._MISU_QUERY_."
$sql = " select *
$sql_common
order by $sort1 $sort2
limit $from_record, $rows ";
@ -92,10 +92,10 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<li><a href="<?php echo title_sort("od_id", 1)."&amp;$qstr1"; ?>">주문번호<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_name")."&amp;$qstr1"; ?>">주문자<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_count", 1)."&amp;$qstr1"; ?>">건수<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_amount", 1)."&amp;$qstr1"; ?>">주문합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cancel_amount", 1)."&amp;$qstr1"; ?>">주문취소<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_receipt_amount")."&amp;$qstr1"; ?>">입금합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("misu", 1)."&amp;$qstr1"; ?>">미수금<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cart_price", 1)."&amp;$qstr1"; ?>">주문합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_cancel_price", 1)."&amp;$qstr1"; ?>">주문취소<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_receipt_price")."&amp;$qstr1"; ?>">입금합계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_misu", 1)."&amp;$qstr1"; ?>">미수금<span class="sound_only"> 순 정렬</span></a></li>
</ul>
<ul id="sodr_all_list">
@ -123,9 +123,9 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
$od_mobile = '(M)';
$tot_itemcount += $row['od_cart_count'];
$tot_orderamount += $row['od_cart_amount'];
$tot_ordercancel += $row['od_cancel_amount'];
$tot_receiptamount += $row['od_receipt_amount'];
$tot_orderprice += $row['od_cart_price'];
$tot_ordercancel += $row['od_cancel_price'];
$tot_receiptprice += $row['od_receipt_price'];
$tot_couponamount += $row['couponamount'];
$tot_misu += $row['misu'];
@ -161,15 +161,15 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<dl class="sodr_pay">
<dt class="sodr_pay_1">주문합계</dt>
<dd class="sodr_pay_1"><?php echo number_format($row['od_cart_amount']); ?></dd>
<dd class="sodr_pay_1"><?php echo number_format($row['od_cart_price']); ?></dd>
<dt class="sodr_pay_1">결제수단</dt>
<dd class="sodr_pay_1"><?php echo $s_receipt_way; ?></dd>
<dt class="sodr_pay_1">입금합계</dt>
<dd class="sodr_pay_1"><?php echo number_format($row['od_receipt_amount']); ?></dd>
<dd class="sodr_pay_1"><?php echo number_format($row['od_receipt_price']); ?></dd>
<dt>쿠폰사용</dt>
<dd><?php echo number_format($row['couponamount']); ?></dd>
<dt>주문취소</dt>
<dd><?php echo number_format($row['od_cancel_amount']); ?></dd>
<dd><?php echo number_format($row['od_cancel_price']); ?></dd>
<dt>미수금</dt>
<dd><?php echo number_format($row['misu']); ?></dd>
</dl>
@ -219,8 +219,8 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
else
$ct_price = ($row3['ct_price'] + $row3['io_price']);
$sub_amount = $row3['ct_qty'] * $ct_price;
$sub_point = $row3['ct_qty'] * $row3['ct_point'];
$sub_price = $row3['ct_qty'] * $ct_price;
$sub_point = $row3['ct_qty'] * $row3['ct_point'];
$ct_send_cost = ($row3['ct_send_cost'] ? '착불' : '선불');
?>
@ -229,7 +229,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<td class="td_bignum"><?php echo number_format($ct_price); ?></td>
<td class="td_num"><?php echo $row3['ct_qty']; ?></td>
<td class="td_num"><?php echo number_format($sub_point); ?></td>
<td class="td_bignum"><?php echo number_format($sub_amount); ?></td>
<td class="td_bignum"><?php echo number_format($sub_price); ?></td>
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
<td class="td_smallmng"><?php echo $row3['ct_status']; ?></td>
</tr>

View File

@ -45,17 +45,17 @@ if ($od_send_mail)
$is_receipt = false;
// 신용카드 입금
if ($od['od_receipt_amount'] > 0 && $od['od_settle_case'] == '신용카드') {
if ($od['od_receipt_price'] > 0 && $od['od_settle_case'] == '신용카드') {
$card_list['od_receipt_time'] = $od['od_receipt_time'];
$card_list['od_receipt_amount'] = display_price($od['od_receipt_amount']);
$card_list['od_receipt_price'] = display_price($od['od_receipt_price']);
$is_receipt = true;
}
// 무통장 입금
if ($od['od_receipt_amount'] > 0 && $od['od_settle_case'] == '무통장') {
if ($od['od_receipt_price'] > 0 && $od['od_settle_case'] == '무통장') {
$bank_list['od_receipt_time'] = $od['od_receipt_time'];
$bank_list['od_receipt_amount'] = display_price($od['od_receipt_amount']);
$bank_list['od_receipt_price'] = display_price($od['od_receipt_price']);
$bank_list['od_deposit_name'] = $od['od_deposit_name'];
$is_receipt = true;

View File

@ -210,7 +210,7 @@ if (mysql_num_rows($result) == 0)
<?php
$mod = 10;
$tot_total_amount = 0;
$tot_total_price = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g4['shop_order_table']} where od_id = '{$row['od_id']}' ";
@ -281,15 +281,15 @@ if (mysql_num_rows($result) == 0)
$sql2 .= " order by it_id, io_type, ct_id ";
$res2 = sql_query($sql2);
$cnt = $sub_tot_qty = $sub_tot_amount = 0;
$cnt = $sub_tot_qty = $sub_tot_price = 0;
while ($row2 = sql_fetch_array($res2))
{
if($row2['io_type'])
$row2_tot_amount = $row2['io_price'] * $row2['ct_qty'];
$row2_tot_price = $row2['io_price'] * $row2['ct_qty'];
else
$row2_tot_amount = ($row2['ct_price'] + $row2['io_price']) * $row2['ct_qty'];
$row2_tot_price = ($row2['ct_price'] + $row2['io_price']) * $row2['ct_qty'];
$sub_tot_qty += $row2['ct_qty'];
$sub_tot_amount += $row2_tot_amount;
$sub_tot_price += $row2_tot_price;
$it_name = stripslashes($row2['it_name']);
$it_name = "$it_name ({$row2['ct_option']})";
@ -307,7 +307,7 @@ if (mysql_num_rows($result) == 0)
<td><?php echo $it_name; ?></td>
<td class="td_bignum"><?php echo number_format($row2['ct_price']); ?></td>
<td class="td_smallnum"><?php echo $fontqty1; ?><?php echo number_format($row2['ct_qty']); ?><?php echo $fontqty2; ?></td>
<td class="td_bignum"><?php echo number_format($row2_tot_amount); ?></td>
<td class="td_bignum"><?php echo number_format($row2_tot_price); ?></td>
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
</tr>
<?php $cnt++; } ?>
@ -316,14 +316,14 @@ if (mysql_num_rows($result) == 0)
<tr>
<th scope="row" colspan="2">합계</th>
<td><?php echo number_format($sub_tot_qty); ?></td>
<td><?php echo number_format($sub_tot_amount); ?></td>
<td><?php echo number_format($sub_tot_price); ?></td>
<td></td>
</tr>
</tfoot>
</table>
<?php
$tot_tot_qty += $sub_tot_qty;
$tot_tot_amount += $sub_tot_amount;
$tot_tot_price += $sub_tot_price;
if ($od_memo) $od_memo = "<p><strong>비고</strong> $od_memo</p>";
if ($od_shop_memo) $od_shop_memo = "<p><strong>상점메모</strong> $od_shop_memo</p>";
@ -341,7 +341,7 @@ if (mysql_num_rows($result) == 0)
<span>
전체
<strong><?php echo number_format($tot_tot_qty); ?></strong>개
<strong><?php echo number_format($tot_tot_amount); ?></strong>원
<strong><?php echo number_format($tot_tot_price); ?></strong>원
</span>
&lt;출력 끝&gt;
</div>

View File

@ -16,9 +16,9 @@ $sql = " update {$g4['shop_order_table']}
set od_deposit_name = '$od_deposit_name',
od_bank_account = '$od_bank_account',
od_receipt_time = '$od_receipt_time',
od_receipt_amount = '$od_receipt_amount',
od_receipt_price = '$od_receipt_price',
od_receipt_point = '$od_receipt_point',
od_cancel_amount = '$od_cancel_amount',
od_cancel_price = '$od_cancel_price',
dl_id = '$dl_id',
od_invoice = '$od_invoice',
od_invoice_time = '$od_invoice_time' ";

View File

@ -8,11 +8,11 @@ $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); /
if ($default['de_sms_use']) {
if ($od_sms_ipgum_check)
{
if ($od_bank_account && $od_receipt_amount && $od_deposit_name)
if ($od_bank_account && $od_receipt_price && $od_deposit_name)
{
$sms_contents = $default['de_sms_cont4'];
$sms_contents = preg_replace("/{이름}/", $od_name, $sms_contents);
$sms_contents = preg_replace("/{입금액}/", number_format($od_receipt_amount), $sms_contents);
$sms_contents = preg_replace("/{입금액}/", number_format($od_receipt_price), $sms_contents);
$sms_contents = preg_replace("/{주문번호}/", $od_id, $sms_contents);
$sms_contents = preg_replace("/{회사명}/", $default['de_admin_company_name'], $sms_contents);

View File

@ -53,7 +53,7 @@ $sql = " select a.od_id,
b.ct_price,
b.ct_point,
b.ct_option,
(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) as ct_sub_amount,
(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) as ct_sub_price,
(b.ct_qty * b.ct_point) as ct_sub_point,
b.it_id,
b.it_name
@ -62,17 +62,6 @@ $sql = " select a.od_id,
limit $from_record, $rows ";
$result = sql_query($sql);
$lines = array();
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$lines[$i] = $row;
$tot_amount += $row['ct_price'];
$tot_qty += $row['ct_qty'];
$tot_sub_amount += $row['ct_sub_amount'];
$tot_sub_point += $row['ct_sub_point'];
}
$qstr1 = "sel_ca_id=$sel_ca_id&amp;sel_field=$sel_field&amp;search=$search&amp;save_search=$search";
$qstr = "$qstr1&amp;sort1=$sort1&amp;sort2=$sort2&amp;page=$page";
@ -133,7 +122,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<li><a href="<?php echo title_sort("a.mb_id")."&amp;$qstr1"; ?>">회원ID<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("ct_price")."&amp;$qstr1"; ?>">판매가<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("ct_qty")."&amp;$qstr1"; ?>">수량<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("ct_sub_amount")."&amp;$qstr1"; ?>">소계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("ct_sub_price")."&amp;$qstr1"; ?>">소계<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("ct_sub_point")."&amp;$qstr1"; ?>">포인트<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("ct_status")."&amp;$qstr1"; ?>">상태<span class="sound_only"> 순 정렬</span></a></li>
</ul>
@ -153,52 +142,56 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<th scope="col">수정</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="row" colspan="4">합 계</td>
<td><?php echo number_format($tot_amount); ?></td>
<td><?php echo number_format($tot_qty); ?></td>
<td><?php echo number_format($tot_sub_amount); ?></td>
<td><?php echo number_format($tot_sub_point); ?></td>
<td colspan="2"></td>
</tr>
</tfoot>
<tbody>
<?php
for ($i=0; $i<count($lines); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = $_SERVER['PHP_SELF'].'?sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;sel_field=c.it_id&amp;search='.$lines[$i]['it_id'];
$it_name = '<a href="'.$href.'">'.cut_str($lines[$i]['it_name'],35).'</a><br>';
$href = $_SERVER['PHP_SELF'].'?sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;sel_field=c.it_id&amp;search='.$row['it_id'];
$it_name = '<a href="'.$href.'">'.cut_str($row['it_name'],35).'</a><br>';
$od_mobile = '';
if($lines[$i]['od_mobile'])
if($row['od_mobile'])
$od_mobile = '(M)';
?>
<tr>
<td class="td_odrnum2">
<?php echo $od_mobile; ?>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=a.od_id&amp;search=<?php echo $lines[$i]['od_id']; ?>"><?php echo $lines[$i]['od_id']; ?></a><br>
<?php echo $lines[$i]['od_time']; ?>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=a.od_id&amp;search=<?php echo $row['od_id']; ?>"><?php echo $row['od_id']; ?></a><br>
<?php echo $row['od_time']; ?>
</td>
<td class="td_it_img"><a href="<?php echo $href; ?>"><?php echo get_it_image($lines[$i]['it_id'], 50, 50); ?><?php echo $it_name; ?></a><br><?php echo $lines[$i]['ct_option']; ?></td>
<td class="td_it_img"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?><?php echo $it_name; ?></a><br>옵션:<?php echo $row['ct_option']; ?></td>
<td class="td_name">
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=od_name&amp;search=<?php echo $lines[$i]['od_name']; ?>"><?php echo cut_str($lines[$i]['od_name'],10,""); ?></a>
<?php if ($lines[$i]['od_deposit_name'] != "") echo '<br>'.$lines[$i]['od_deposit_name']?>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=od_name&amp;search=<?php echo $row['od_name']; ?>"><?php echo cut_str($row['od_name'],10,""); ?></a>
<?php if ($row['od_deposit_name'] != "") echo '<br>'.$row['od_deposit_name']?>
</td>
<td class="td_name"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=a.mb_id&amp;search=<?php echo $lines[$i]['mb_id']; ?>"><?php echo $lines[$i]['mb_id']; ?></a></td>
<td><?php echo number_format($lines[$i]['ct_price']); ?></td>
<td><?php echo $lines[$i]['ct_qty']; ?></td>
<td><?php echo number_format($lines[$i]['ct_sub_amount']); ?></td>
<td><?php echo number_format($lines[$i]['ct_sub_point']); ?></td>
<td><a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=ct_status&amp;search=<?php echo $lines[$i]['ct_status']; ?>"><?php echo $lines[$i]['ct_status']; ?></a></td>
<td class="td_smallmng"><a href="./orderform.php?od_id=<?php echo $lines[$i]['od_id']; ?>">주문수정</a></td>
<td class="td_name"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=a.mb_id&amp;search=<?php echo $row['mb_id']; ?>"><?php echo $row['mb_id']; ?></a></td>
<td><?php echo number_format($row['ct_price']); ?></td>
<td><?php echo $row['ct_qty']; ?></td>
<td><?php echo number_format($row['ct_sub_price']); ?></td>
<td><?php echo number_format($row['ct_sub_point']); ?></td>
<td><a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&amp;sort2=<?php echo $sort2; ?>&amp;sel_field=ct_status&amp;search=<?php echo $row['ct_status']; ?>"><?php echo $row['ct_status']; ?></a></td>
<td class="td_smallmng"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>">주문수정</a></td>
</tr>
<?php
$tot_price += $row['ct_price'];
$tot_qty += $row['ct_qty'];
$tot_sub_price += $row['ct_sub_price'];
$tot_sub_point += $row['ct_sub_point'];
}
if ($i == 0) echo '<tr><td colspan="11" class="empty_table">자료가 한건도 없습니다.</td></tr>';
?>
</tbody>
<tfoot>
<tr>
<th scope="row" colspan="4">합 계</td>
<td><?php echo number_format($tot_price); ?></td>
<td><?php echo number_format($tot_qty); ?></td>
<td><?php echo number_format($tot_sub_price); ?></td>
<td><?php echo number_format($tot_sub_point); ?></td>
<td colspan="2"></td>
</tr>
</tfoot>
</table>
</section>

View File

@ -30,8 +30,8 @@ if(!$row['pp_id'])
<td><input type="text" name="od_id" value="<?php echo $row['od_id']; ?>" id="od_id" class="frm_input"></td>
</tr>
<tr>
<th scope="row"><label for="pp_amount">주문금액</label></th>
<td><input type="text" name="pp_amount" value="" id="pp_amount" required class="required frm_input" size="20"> 원</td>
<th scope="row"><label for="pp_price">주문금액</label></th>
<td><input type="text" name="pp_price" value="" id="pp_price" required class="required frm_input" size="20"> 원</td>
</tr>
</tbody>
</table>
@ -48,7 +48,7 @@ if(!$row['pp_id'])
// <![CDATA[
function form_check(f)
{
if(f.pp_amount.value.replace(/[0-9]/g, "").length > 0) {
if(f.pp_price.value.replace(/[0-9]/g, "").length > 0) {
alert("주문금액은 숫자만 입력해 주십시오");
return false;
}

View File

@ -8,9 +8,9 @@ $_POST = array_map('trim', $_POST);
if(!$_POST['pp_name'])
alert('이름을 입력해 주십시오.');
if(!$_POST['pp_amount'])
if(!$_POST['pp_price'])
alert('주문금액을 입력해 주십시오.');
if(preg_match('/[^0-9]/', $_POST['pp_amount']))
if(preg_match('/[^0-9]/', $_POST['pp_price']))
alert('주문금액은 숫자만 입력해 주십시오.');
if($_POST['od_id']) {
@ -34,7 +34,7 @@ $sql = " insert into {$g4['shop_personalpay_table']}
pp_name = '{$_POST['pp_name']}',
pp_content = '{$row['pp_content']}',
pp_use = '{$row['pp_use']}',
pp_amount = '{$_POST['pp_amount']}',
pp_price = '{$_POST['pp_price']}',
pp_ip = '{$_SERVER['REMOTE_ADDR']}',
pp_time = '".G4_TIME_YMDHIS."' ";
sql_query($sql);

View File

@ -24,7 +24,7 @@ $wrp_tag_end = '';
if($popup == 'yes') { // 팝업창일 때
include_once(G4_PATH.'/head.sub.php');
$pp['od_id'] = $od_id;
$sql = " select od_id, od_name, (od_cart_amount + od_send_cost + od_send_cost2 - od_cart_coupon - od_coupon - od_send_coupon - od_receipt_amount - od_cancel_amount) as misu
$sql = " select od_id, od_name, od_misu
from {$g4['shop_order_table']}
where od_id = '$od_id' ";
$od = sql_fetch($sql);
@ -34,8 +34,8 @@ if($popup == 'yes') { // 팝업창일 때
$pp['pp_name'] = $od['od_name'];
if($od['misu'] > 0)
$pp['pp_amount'] = $od['misu'];
if($od['od_misu'] > 0)
$pp['pp_price'] = $od['od_misu'];
$wrp_tag_st = '<div class="new_win">'.PHP_EOL.'<h1 id="new_win_title">'.$html_title.'</h1>';
$wrp_tag_end = '</div>';
}
@ -67,8 +67,8 @@ else { // 현재페이지일 때
<td><input type="text" name="pp_name" value="<?php echo $pp['pp_name']; ?>" id="pp_name" required class="required frm_input"></td>
</tr>
<tr>
<th scope="row"><label for="pp_amount">주문금액</label></th>
<td><input type="text" name="pp_amount" value="<?php echo $pp['pp_amount']; ?>" id="pp_amount" required class="required frm_input" size="15"> 원</td>
<th scope="row"><label for="pp_price">주문금액</label></th>
<td><input type="text" name="pp_price" value="<?php echo $pp['pp_price']; ?>" id="pp_price" required class="required frm_input" size="15"> 원</td>
</tr>
<tr>
<th scope="row"><label for="od_id">주문번호</label></th>
@ -80,8 +80,8 @@ else { // 현재페이지일 때
</tr>
<?php if($popup != 'yes') { ?>
<tr>
<th scope="row"><label for="pp_receipt_amount">결제금액</label></th>
<td><input type="text" name="pp_receipt_amount" value="<?php echo $pp['pp_receipt_amount'] ? $pp['pp_receipt_amount'] : ''; ?>" id="pp_receipt_amount" class="frm_input" size="15"> 원</td>
<th scope="row"><label for="pp_receipt_price">결제금액</label></th>
<td><input type="text" name="pp_receipt_price" value="<?php echo $pp['pp_receipt_price'] ? $pp['pp_receipt_price'] : ''; ?>" id="pp_receipt_price" class="frm_input" size="15"> 원</td>
</tr>
<tr>
<th scope="row"><label for="pp_settle_case">결제방법</label></th>
@ -138,7 +138,7 @@ else { // 현재페이지일 때
<script>
function form_check(f)
{
if(f.pp_amount.value.replace(/[0-9]/g, "").length > 0) {
if(f.pp_price.value.replace(/[0-9]/g, "").length > 0) {
alert("주문금액은 숫자만 입력해 주십시오");
return false;
}

View File

@ -20,9 +20,9 @@ if($w == 'd') {
if(!$_POST['pp_name'])
alert('이름을 입력해 주십시오.');
if(!$_POST['pp_amount'])
if(!$_POST['pp_price'])
alert('주문금액을 입력해 주십시오.');
if(preg_match('/[^0-9]/', $_POST['pp_amount']))
if(preg_match('/[^0-9]/', $_POST['pp_price']))
alert('주문금액은 숫자만 입력해 주십시오.');
if($_POST['od_id']) {
@ -33,10 +33,10 @@ if($w == 'd') {
}
$sql_common = " pp_name = '{$_POST['pp_name']}',
pp_amount = '{$_POST['pp_amount']}',
pp_price = '{$_POST['pp_price']}',
od_id = '{$_POST['od_id']}',
pp_content = '{$_POST['pp_content']}',
pp_receipt_amount = '{$_POST['pp_receipt_amount']}',
pp_receipt_price = '{$_POST['pp_receipt_price']}',
pp_settle_case = '{$_POST['pp_settle_case']}',
pp_receipt_time = '{$_POST['pp_receipt_time']}',
pp_shop_memo = '{$_POST['pp_shop_memo']}',

View File

@ -129,9 +129,9 @@ $colspan = 8;
</td>
<td class="spp_list_name"><?php echo $row['pp_name']; ?></td>
<td class="td_odrnum3 spp_list_id"><?php echo $od_id; ?></td>
<td class="td_bignum"><?php echo number_format($row['pp_amount']); ?></td>
<td class="td_bignum"><?php echo number_format($row['pp_receipt_amount']); ?></td>
<td class="td_bignum"><?php echo number_format($row['pp_amount'] - $row['pp_receipt_amount']); ?></td>
<td class="td_bignum"><?php echo number_format($row['pp_price']); ?></td>
<td class="td_bignum"><?php echo number_format($row['pp_receipt_price']); ?></td>
<td class="td_bignum"><?php echo number_format($row['pp_price'] - $row['pp_receipt_price']); ?></td>
<td class="td_payby"><?php echo $row['pp_settle_case']; ?></td>
<td class="td_date"><?php echo is_null_time($row['pp_receipt_time']) ? '' : substr($row['pp_receipt_time'], 2, 8); ?></td>
<td class="td_boolean"><?php echo $row['pp_use'] ? '예' : '아니오'; ?></td>

View File

@ -18,7 +18,7 @@ function print_line($save)
<tr class="sale1">
<td><a href="./sale1today.php?date=<?php echo $date; ?>"><?php echo $save['od_date']; ?></a></td>
<td><?php echo number_format($save['ordercount']); ?></td>
<td><?php echo number_format($save['orderamount']); ?></td>
<td><?php echo number_format($save['orderprice']); ?></td>
<td><?php echo number_format($save['ordercoupon']); ?></td>
<td><?php echo number_format($save['receiptbank']); ?></td>
<td><?php echo number_format($save['receiptcard']); ?></td>
@ -32,11 +32,11 @@ function print_line($save)
$sql = " select od_id,
SUBSTRING(od_time,1,10) as od_date,
od_settle_case,
od_receipt_amount,
od_receipt_price,
od_receipt_point,
od_cart_amount,
od_cancel_amount,
(od_cart_amount + od_send_cost + od_send_cost2 - od_cart_coupon - od_coupon - od_send_coupon - od_receipt_amount - od_cancel_amount) as misu,
od_cart_price,
od_cancel_price,
od_misu,
(od_cart_coupon + od_coupon + od_send_coupon) as couponamount
from {$g4['shop_order_table']}
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
@ -77,26 +77,26 @@ $result = sql_query($sql);
}
$save['ordercount']++;
$save['orderamount'] += $row['od_cart_amount'];
$save['ordercancel'] += $row['od_cancel_amount'];
$save['orderprice'] += $row['od_cart_price'];
$save['ordercancel'] += $row['od_cancel_price'];
$save['ordercoupon'] += $row['couponamount'];
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$save['receiptbank'] += $row['od_receipt_amount'];
$save['receiptbank'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$save['receiptcard'] += $row['od_receipt_amount'];
$save['receiptcard'] += $row['od_receipt_price'];
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
$save['misu'] += $row['misu'];
$save['misu'] += $row['od_misu'];
$tot['ordercount']++;
$tot['orderamount'] += $row['od_cart_amount'];
$tot['ordercancel'] += $row1['od_cancel_amount'];
$tot['orderprice'] += $row['od_cart_price'];
$tot['ordercancel'] += $row1['od_cancel_price'];
$tot['ordercoupon'] += $row['couponamount'];
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$tot['receiptbank'] += $row['od_receipt_amount'];
$tot['receiptbank'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$tot['receiptcard'] += $row['od_receipt_amount'];
$tot['receiptcard'] += $row['od_receipt_price'];
$tot['receiptpoint '] += $row['od_receipt_point'];
$tot['misu'] += $row['misu'];
$tot['misu'] += $row['od_misu'];
}
if ($i == 0) {
@ -110,7 +110,7 @@ $result = sql_query($sql);
<tr>
<td>합계</td>
<td><?php echo number_format($tot['ordercount']); ?></td>
<td><?php echo number_format($tot['orderamount']); ?></td>
<td><?php echo number_format($tot['orderprice']); ?></td>
<td><?php echo number_format($tot['ordercoupon']); ?></td>
<td><?php echo number_format($tot['receiptbank']); ?></td>
<td><?php echo number_format($tot['receiptcard']); ?></td>

View File

@ -18,8 +18,8 @@ function print_line($save)
<tr>
<td><a href="./sale1date.php?fr_date=<?php echo $date; ?>01&amp;to_date=<?php echo $date; ?>31"><?php echo $save['od_date']; ?></a></td>
<td><?php echo number_format($save['ordercount']); ?></td>
<td><?php echo number_format($save['orderamount']); ?></td>
<td><?php echo number_format($save['ordercancel'] + $save['dc']); ?></td>
<td><?php echo number_format($save['orderprice']); ?></td>
<td><?php echo number_format($save['ordercoupon']); ?></td>
<td><?php echo number_format($save['receiptbank']); ?></td>
<td><?php echo number_format($save['receiptcard']); ?></td>
<td><?php echo number_format($save['receiptpoint']); ?></td>
@ -33,11 +33,11 @@ $sql = " select od_id,
SUBSTRING(od_time,1,7) as od_date,
od_send_cost,
od_settle_case,
od_receipt_amount,
od_receipt_price,
od_receipt_point,
od_cart_amount,
od_cancel_amount,
(od_cart_amount + od_send_cost + od_send_cost2 - od_cart_coupon - od_coupon - od_send_coupon - od_receipt_amount - od_cancel_amount) as misu,
od_cart_price,
od_cancel_price,
od_misu,
(od_cart_coupon + od_coupon + od_send_coupon) as couponamount
from {$g4['shop_order_table']}
where SUBSTRING(od_time,1,7) between '$fr_month' and '$to_month'
@ -78,26 +78,26 @@ $result = sql_query($sql);
}
$save['ordercount']++;
$save['orderamount'] += $row['od_cart_amount'];
$save['ordercancel'] += $row['od_cancel_amount'];
$save['orderprice'] += $row['od_cart_price'];
$save['ordercancel'] += $row['od_cancel_price'];
$save['ordercoupon'] += $row['couponamount'];
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$save['receiptbank'] += $row['od_receipt_amount'];
$save['receiptbank'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$save['receiptcard'] += $row['od_receipt_amount'];
$save['receiptcard'] += $row['od_receipt_price'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['misu'] += $row['misu'];
$save['misu'] += $row['od_misu'];
$tot['ordercount']++;
$tot['orderamount'] += $row['od_cart_amount'];
$tot['ordercancel'] += $row['od_cancel_amount'];
$tot['orderprice'] += $row['od_cart_price'];
$tot['ordercancel'] += $row['od_cancel_price'];
$tot['ordercoupon'] += $row['couponamount'];
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$tot['receiptbank'] += $row['od_receipt_amount'];
$tot['receiptbank'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$tot['receiptcard'] += $row['od_receipt_amount'];
$tot['receiptcard'] += $row['od_receipt_price'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['misu'] += $row['misu'];
$tot['misu'] += $row['od_misu'];
}
if ($i == 0) {
@ -111,7 +111,7 @@ $result = sql_query($sql);
<tr>
<td>합 계</td>
<td><?php echo number_format($tot['ordercount']); ?></td>
<td><?php echo number_format($tot['orderamount']); ?></td>
<td><?php echo number_format($tot['orderprice']); ?></td>
<td><?php echo number_format($tot['ordercoupon']); ?></td>
<td><?php echo number_format($tot['receiptbank']); ?></td>
<td><?php echo number_format($tot['receiptcard']); ?></td>

View File

@ -13,11 +13,11 @@ $sql = " select od_id,
mb_id,
od_name,
od_settle_case,
od_cart_amount,
od_receipt_amount,
od_cart_price,
od_receipt_price,
od_receipt_point,
od_cancel_amount,
(od_cart_amount + od_send_cost + od_send_cost2 - od_cart_coupon - od_coupon - od_send_coupon - od_receipt_amount - od_cancel_amount) as misu,
od_cancel_price,
od_misu,
(od_cart_coupon + od_coupon + od_send_coupon) as couponamount
from {$g4['shop_order_table']}
where SUBSTRING(od_time,1,10) = '$date'
@ -53,36 +53,34 @@ $result = sql_query($sql);
$href = '<a href="./orderlist.php?sel_field=mb_id&amp;search='.$row['mb_id'].'">';
}
$misu = $row['misu'];
$receipt_bank = $receipt_card = 0;
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$receipt_bank = $row['od_receipt_amount'];
$receipt_bank = $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$receipt_card = $row['od_receipt_amount'];
$receipt_card = $row['od_receipt_price'];
?>
<tr>
<td class="td_odrnum2"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>"><?php echo $row['od_id']; ?></a></td>
<td class="td_name"><?php echo $href; ?><?php echo $row['od_name']; ?></a></td>
<td class="td_num"><?php echo number_format($row['od_cart_amount']); ?></td>
<td class="td_num"><?php echo number_format($row['od_cart_price']); ?></td>
<td class="td_num"><?php echo number_format($row['couponamount']); ?></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($row['od_receipt_point']); ?></td>
<td class="td_num"><?php echo number_format($row['od_cancel_amount']); ?></td>
<td class="td_num"><?php echo number_format($misu); ?></td>
<td class="td_num"><?php echo number_format($row['od_cancel_price']); ?></td>
<td class="td_num"><?php echo number_format($row['od_misu']); ?></td>
</tr>
<?php
$tot['orderamount'] += $row['od_cart_amount'];
$tot['ordercancel'] += $row1['od_cancel_amount'];
$tot['orderprice'] += $row['od_cart_price'];
$tot['ordercancel'] += $row1['od_cancel_price'];
$tot['coupon'] += $row['couponamount'] ;
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$tot['receipt_bank'] += $row['od_receipt_amount'];
$tot['receipt_bank'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$tot['receipt_card'] += $row['od_receipt_amount'];
$tot['receipt_card'] += $row['od_receipt_price'];
$tot['receipt_point'] += $row['od_receipt_point'];
$tot['misu'] += $misu;
$tot['misu'] += $row['od_misu'];
}
if ($i == 0) {
@ -93,7 +91,7 @@ $result = sql_query($sql);
<tfoot>
<tr>
<td colspan="2">합 계</td>
<td><?php echo number_format($tot['orderamount']); ?></td>
<td><?php echo number_format($tot['orderprice']); ?></td>
<td><?php echo number_format($tot['coupon']); ?></td>
<td><?php echo number_format($tot['receipt_bank']); ?></td>
<td><?php echo number_format($tot['receipt_card']); ?></td>

View File

@ -13,8 +13,8 @@ function print_line($save)
<tr>
<td><a href="./sale1month.php?fr_month=<?php echo $save['od_date']; ?>01&amp;to_month=<?php echo $save['od_date']; ?>12"><?php echo $save['od_date']; ?></a></td>
<td><?php echo number_format($save['ordercount']); ?></td>
<td><?php echo number_format($save['orderamount']); ?></td>
<td><?php echo number_format($save['ordercancel'] + $save['dc']); ?></td>
<td><?php echo number_format($save['orderprice']); ?></td>
<td><?php echo number_format($save['ordercoupon']); ?></td>
<td><?php echo number_format($save['receiptbank']); ?></td>
<td><?php echo number_format($save['receiptcard']); ?></td>
<td><?php echo number_format($save['receiptpoint']); ?></td>
@ -28,11 +28,11 @@ $sql = " select od_id,
SUBSTRING(od_time,1,4) as od_date,
od_send_cost,
od_settle_case,
od_receipt_amount,
od_receipt_price,
od_receipt_point,
od_cart_amount,
od_cancel_amount,
(od_cart_amount + od_send_cost + od_send_cost2 - od_cart_coupon - od_coupon - od_send_coupon - od_receipt_amount - od_cancel_amount) as misu,
od_cart_price,
od_cancel_price,
od_misu,
(od_cart_coupon + od_coupon + od_send_coupon) as couponamount
from {$g4['shop_order_table']}
where SUBSTRING(od_time,1,4) between '$fr_year' and '$to_year'
@ -73,26 +73,26 @@ $result = sql_query($sql);
}
$save['ordercount']++;
$save['orderamount'] += $row['od_cart_amount'];
$save['ordercancel'] += $row['od_cancel_amount'];
$save['orderprice'] += $row['od_cart_price'];
$save['ordercancel'] += $row['od_cancel_price'];
$save['ordercoupon'] += $row['couponamount'];
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$save['receiptbank'] += $row['od_receipt_amount'];
$save['receiptbank'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$save['receiptcard'] += $row['od_receipt_amount'];
$save['receiptcard'] += $row['od_receipt_price'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['misu'] += $row['misu'];
$save['misu'] += $row['od_misu'];
$tot['ordercount']++;
$tot['orderamount'] += $row['od_cart_amount'];
$tot['ordercancel'] += $row1['od_cancel_amount'];
$tot['orderprice'] += $row['od_cart_price'];
$tot['ordercancel'] += $row1['od_cancel_price'];
$tot['ordercoupon'] += $row['couponamount'];
if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
$tot['receiptbank'] += $row['od_receipt_amount'];
$tot['receiptbank'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$tot['receiptcard'] += $row['od_receipt_amount'];
$tot['receiptcard'] += $row['od_receipt_price'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['misu'] += $row['misu'];
$tot['misu'] += $row['od_misu'];
}
if ($i == 0) {
@ -106,7 +106,7 @@ $result = sql_query($sql);
<tr>
<td>합 계</td>
<td><?php echo number_format($tot['ordercount']); ?></td>
<td><?php echo number_format($tot['orderamount']); ?></td>
<td><?php echo number_format($tot['orderprice']); ?></td>
<td><?php echo number_format($tot['ordercoupon']); ?></td>
<td><?php echo number_format($tot['receiptbank']); ?></td>
<td><?php echo number_format($tot['receiptcard']); ?></td>

View File

@ -64,7 +64,7 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
</td>
<td><?php echo $row['sc_name']; ?></td>
<td class="td_bigpostal"><?php echo preg_replace('/([0-9]{3})([0-9]{3})/', '\\1-\\2', $row['sc_zip1']).' ~ '.preg_replace('/([0-9]{3})([0-9]{3})/', '\\1-\\2', $row['sc_zip2']); ?></td>
<td class="td_sendcost_add"><?php echo number_format($row['sc_amount']); ?></td>
<td class="td_sendcost_add"><?php echo number_format($row['sc_price']); ?></td>
</tr>
<?php
}
@ -115,8 +115,8 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
</td>
</tr>
<tr>
<th scope="row"><label for="sc_amount">추가배송비<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="sc_amount" id="sc_amount" size="8" required class="required frm_input"> 원</td>
<th scope="row"><label for="sc_price">추가배송비<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="sc_price" id="sc_price" size="8" required class="required frm_input"> 원</td>
</tr>
</tbody>
</table>

View File

@ -23,7 +23,7 @@ if($w == 'd') {
$sc_name = trim($_POST['sc_name']);
$sc_zip1 = preg_replace('/[^0-9]/', '', $_POST['sc_zip1']);
$sc_zip2 = preg_replace('/[^0-9]/', '', $_POST['sc_zip2']);
$sc_amount = preg_replace('/[^0-9]/', '', $_POST['sc_amount']);
$sc_price = preg_replace('/[^0-9]/', '', $_POST['sc_price']);
if(!$sc_name)
alert('지역명을 입력해 주십시오.');
@ -31,13 +31,13 @@ if($w == 'd') {
alert('우편번호 시작을 입력해 주십시오.');
if(!$sc_zip2)
alert('우편번호 끝을 입력해 주십시오.');
if(!$sc_amount)
if(!$sc_price)
alert('추가배송비를 입력해 주십시오.');
$sql = " insert into {$g4['shop_sendcost_table']}
( sc_name, sc_zip1, sc_zip2, sc_amount )
( sc_name, sc_zip1, sc_zip2, sc_price )
values
( '$sc_name', '$sc_zip1', '$sc_zip2', '$sc_amount' ) ";
( '$sc_name', '$sc_zip1', '$sc_zip2', '$sc_price' ) ";
sql_query($sql);
}

View File

@ -424,10 +424,10 @@ if(!sql_query(" select pp_id from {$g4['shop_personalpay_table']} limit 1 ", fal
`pp_name` VARCHAR(255) NOT NULL DEFAULT '',
`pp_content` TEXT NOT NULL,
`pp_use` TINYINT(4) NOT NULL DEFAULT '0',
`pp_amount` INT(11) NOT NULL DEFAULT '0',
`pp_price` INT(11) NOT NULL DEFAULT '0',
`pp_tno` varchar(255) NOT NULL DEFAULT '',
`pp_app_no` varchar(20) NOT NULL DEFAULT '',
`pp_receipt_amount` INT(11) NOT NULL DEFAULT '0',
`pp_receipt_price` INT(11) NOT NULL DEFAULT '0',
`pp_settle_case` VARCHAR(255) NOT NULL DEFAULT '',
`pp_bank_account` VARCHAR(255) NOT NULL DEFAULT '',
`pp_deposit_name` VARCHAR(255) NOT NULL DEFAULT '',
@ -479,9 +479,38 @@ if(!sql_query(" select de_settle_min_point from {$g4['shop_default_table']} ", f
if(!sql_query(" select od_cart_count from {$g4['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g4['shop_order_table']}`
ADD `od_cart_count` int(11) NOT NULL DEFAULT '0' AFTER `od_memo`,
ADD `od_cart_amount` int(11) NOT NULL DEFAULT '0' AFTER `od_cart_count`,
ADD `od_cart_price` int(11) NOT NULL DEFAULT '0' AFTER `od_cart_count`,
ADD `od_cart_coupon` int(11) NOT NULL DEFAULT '0' AFTER `od_cart_amount`,
ADD `od_cancel_amount` int(11) NOt NULL DEFAULT '0' AFTER `od_receipt_amount`,
ADD `od_cancel_price` int(11) NOt NULL DEFAULT '0' AFTER `od_receipt_amount`,
ADD `od_status` varchar(255) NOT NULL DEFAULT '' AFTER `od_mod_history` ", true);
}
// order amount 필드명 수정
if(sql_query(" select od_cart_amount from {$g4['shop_order_table']} limit 1", false)) {
sql_query(" ALTER TABLE `{$g4['shop_order_table']}`
CHANGE `od_cart_amount` `od_cart_price` int(11) NOT NULL DEFAULT '0',
CHANGE `od_receipt_amount` `od_receipt_price` int(11) NOT NULL DEFAULT '0',
CHANGE `od_cancel_amount` `od_cancel_price` int(11) NOT NULL DEFAULT '0' ", true);
}
// amount 필드명 수정
if(sql_query(" select cp_amount from {$g4['shop_cart_table']} limit 1", false)) {
sql_query(" ALTER TABLE `{$g4['shop_personalpay_table']}`
CHANGE `pp_amount` `pp_price` int(11) NOT NULL DEFAULT '0',
CHANGE `pp_receipt_amount` `pp_receipt_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g4['shop_cart_table']}`
CHANGE `cp_amount` `cp_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g4['shop_coupon_table']}`
CHANGE `cp_amount` `cp_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g4['shop_sendcost_table']}`
CHANGE `sc_amount` `sc_price` int(11) NOT NULL DEFAULT '0' ", true);
sql_query(" ALTER TABLE `{$g4['shop_item_table']}`
CHANGE `it_sc_amount` `it_sc_price` int(11) NOT NULL DEFAULT '0' ", true);
}
// 미수 필드 추가
if(!sql_query(" select od_misu from {$g4['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g4['shop_order_table']}`
ADD `od_misu` int(11) NOT NULL DEFAULT '0' AFTER `od_coupon` ", true);
}
?>

View File

@ -493,7 +493,6 @@ if($shop_install) {
fwrite($f, "\$g4['shop_wish_table'] = SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블\n");
fwrite($f, "\$g4['shop_coupon_table'] = SHOP_TABLE_PREFIX.'coupon'; // 쿠폰정보 테이블\n");
fwrite($f, "\$g4['shop_sendcost_table'] = SHOP_TABLE_PREFIX.'sendcost'; // 추가배송비 테이블\n");
fwrite($f, "\$g4['shop_request_table'] = SHOP_TABLE_PREFIX.'request'; // 주문 취소, 교환, 반품 요청테이블\n");
fwrite($f, "\$g4['shop_personalpay_table'] = SHOP_TABLE_PREFIX.'personalpay'; // 개인결제 정보 테이블\n");
fwrite($f, "\$g4['shop_order_address_table'] = SHOP_TABLE_PREFIX.'order_address'; // 배송지이력 정보 테이블\n");
fwrite($f, "?>");

View File

@ -37,7 +37,7 @@ CREATE TABLE IF NOT EXISTS `shop_cart` (
`ct_history` text NOT NULL,
`ct_price` int(11) NOT NULL DEFAULT '0',
`ct_point` int(11) NOT NULL DEFAULT '0',
`cp_amount` int(11) NOT NULL DEFAULT '0',
`cp_price` int(11) NOT NULL DEFAULT '0',
`ct_point_use` tinyint(4) NOT NULL DEFAULT '0',
`ct_stock_use` tinyint(4) NOT NULL DEFAULT '0',
`ct_option` varchar(255) NOT NULL DEFAULT '',
@ -122,7 +122,7 @@ CREATE TABLE IF NOT EXISTS `shop_coupon` (
`mb_id` VARCHAR(255) NOT NULL DEFAULT '',
`cp_start` DATE NOT NULL DEFAULT '0000-00-00',
`cp_end` DATE NOT NULL DEFAULT '0000-00-00',
`cp_amount` INT(11) NOT NULL DEFAULT '0',
`cp_price` INT(11) NOT NULL DEFAULT '0',
`cp_type` TINYINT(4) NOT NULL DEFAULT '0',
`cp_trunc` INT(11) NOT NULL DEFAULT '0',
`cp_minimum` INT(11) NOT NULL DEFAULT '0',
@ -397,7 +397,7 @@ CREATE TABLE IF NOT EXISTS `shop_item` (
`it_stock_qty` int(11) NOT NULL DEFAULT '0',
`it_sc_type` tinyint(4) NOT NULL DEFAULT '0',
`it_sc_method` tinyint(4) NOT NULL DEFAULT '0',
`it_sc_amount` int(11) NOT NULL DEFAULT '0',
`it_sc_price` int(11) NOT NULL DEFAULT '0',
`it_sc_minimum` int(11) NOT NULL DEFAULT '0',
`it_sc_qty` int(11) NOT NULL DEFAULT '0',
`it_head_html` text NOT NULL,
@ -573,17 +573,18 @@ CREATE TABLE IF NOT EXISTS `shop_order` (
`od_b_addr2` varchar(100) NOT NULL DEFAULT '',
`od_memo` text NOT NULL,
`od_cart_count` int(11) NOT NULL DEFAULT '0',
`od_cart_amount` int(11) NOT NULL DEFAULT '0',
`od_cart_price` int(11) NOT NULL DEFAULT '0',
`od_cart_coupon` int(11) NOT NULL DEFAULT '0',
`od_send_cost` int(11) NOT NULL DEFAULT '0',
`od_send_coupon` int(11) NOT NULL DEFAULT '0',
`od_send_cost2` int(11) NOT NULL DEFAULT '0',
`od_receipt_amount` int(11) NOT NULL DEFAULT '0',
`od_cancel_amount` int(11) NOT NULL DEFAULT '0',
`od_receipt_price` int(11) NOT NULL DEFAULT '0',
`od_cancel_price` int(11) NOT NULL DEFAULT '0',
`od_receipt_point` int(11) NOT NULL DEFAULT '0',
`od_bank_account` varchar(255) NOT NULL DEFAULT '',
`od_receipt_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`od_coupon` int(11) NOT NULL DEFAULT '0',
`od_misu` int(11) NOT NULL DEFAULT '0',
`od_shop_memo` text NOT NULL,
`od_mod_history` text NOT NULL,
`od_status` varchar(255) NOT NULL DEFAULT '',
@ -649,10 +650,10 @@ CREATE TABLE IF NOT EXISTS `shop_personalpay` (
`pp_name` VARCHAR(255) NOT NULL DEFAULT '',
`pp_content` TEXT NOT NULL,
`pp_use` TINYINT(4) NOT NULL DEFAULT '0',
`pp_amount` INT(11) NOT NULL DEFAULT '0',
`pp_price` INT(11) NOT NULL DEFAULT '0',
`pp_tno` VARCHAR(255) NOT NULL DEFAULT '',
`pp_app_no` VARCHAR(20) NOT NULL DEFAULT '',
`pp_receipt_amount` INT(11) NOT NULL DEFAULT '0',
`pp_receipt_price` INT(11) NOT NULL DEFAULT '0',
`pp_settle_case` VARCHAR(255) NOT NULL DEFAULT '',
`pp_bank_account` VARCHAR(255) NOT NULL DEFAULT '',
`pp_deposit_name` VARCHAR(255) NOT NULL DEFAULT '',
@ -677,7 +678,7 @@ CREATE TABLE IF NOT EXISTS `shop_sendcost` (
`sc_name` VARCHAR(255) NOT NULL DEFAULT '',
`sc_zip1` VARCHAR(10) NOT NULL DEFAULT '',
`sc_zip2` VARCHAR(10) NOT NULL DEFAULT '',
`sc_amount` INT(11) NOT NULL DEFAULT '0',
`sc_price` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`sc_id`),
KEY `sc_zip1` (`sc_zip1`),
KEY `sc_zip2` (`sc_zip2`)

View File

@ -1510,7 +1510,7 @@ function get_item_sendcost($it_id, $price, $qty)
if($default['de_send_cost_case'] != '개별')
return 0;
$sql = " select it_id, it_sc_type, it_sc_method, it_sc_amount, it_sc_minimum, it_sc_qty
$sql = " select it_id, it_sc_type, it_sc_method, it_sc_price, it_sc_minimum, it_sc_qty
from {$g4['shop_item_table']}
where it_id = '$it_id' ";
$it = sql_fetch($sql);
@ -1522,15 +1522,15 @@ function get_item_sendcost($it_id, $price, $qty)
if($price >= $it['it_sc_minimum'])
$sendcost = 0;
else
$sendcost = $it['it_sc_amount'];
$sendcost = $it['it_sc_price'];
} else if($it['it_sc_type'] == 2) { // 유료배송
$sendcost = $it['it_sc_amount'];
$sendcost = $it['it_sc_price'];
} else { // 수량별 부과
if(!$it['it_sc_qty'])
$it['it_sc_qty'] = 1;
$q = ceil((int)$qty / (int)$it['it_sc_qty']);
$sendcost = (int)$it['it_sc_amount'] * $q;
$sendcost = (int)$it['it_sc_price'] * $q;
}
} else {
$sendcost = 0;
@ -1538,6 +1538,26 @@ function get_item_sendcost($it_id, $price, $qty)
return $sendcost;
}
// 주문 미수금
function get_order_misu($od_id)
{
if(!$od_id)
return 0;
global $g4;
$sql = " select od_id,
( od_cart_price + od_send_cost + od_send_cost2 - od_cart_coupon - od_coupon - od_send_coupon - od_receipt_price - od_receipt_point ) as misu
from {$g4['shop_order_table']}
where od_id = '$od_id' ";
$od = sql_fetch($sql);
if(!$od['od_id'])
return 0;
return $od['misu'];
}
//==============================================================================
// 쇼핑몰 라이브러리 모음 끝
//==============================================================================

View File

@ -25,7 +25,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<tbody>
<?php
$tot_point = 0;
$tot_sell_amount = 0;
$tot_sell_price = 0;
// $s_cart_id 로 현재 장바구니 자료 쿼리
$sql = " select a.ct_id,
@ -80,8 +80,8 @@ include_once(G4_MSHOP_PATH.'/_head.php');
$it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']);
}
$point = $sum['point'];
$sell_amount = $sum['price'];
$point = $sum['point'];
$sell_price = $sum['price'];
?>
<tr>
@ -94,14 +94,14 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
<td class="td_bignum"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_bignum"><?php echo number_format($sell_amount); ?></td>
<td class="td_bignum"><?php echo number_format($sell_price); ?></td>
<td class="td_num"><?php echo number_format($sum['point']); ?></td>
<td class="td_smallmng"><input type="checkbox" name="ct_chk[<?php echo $i; ?>]" value="1" checked="checked"></td>
</tr>
<?php
$tot_point += $point;
$tot_sell_amount += $sell_amount;
$tot_point += $point;
$tot_sell_price += $sell_price;
} // for 끝
if ($i == 0) {
@ -117,7 +117,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
if ($tot_sell_price < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
@ -131,8 +131,8 @@ include_once(G4_MSHOP_PATH.'/_head.php');
</table>
<?php
$tot_amount = $tot_sell_amount + $send_cost; // 총계 = 주문상품금액합계 + 배송비
if ($tot_amount > 0 || $send_cost > 0) {
$tot_price = $tot_sell_price + $send_cost; // 총계 = 주문상품금액합계 + 배송비
if ($tot_price > 0 || $send_cost > 0) {
?>
<dl id="sod_bsk_tot">
<?php if ($send_cost > 0) { // 배송비가 0 보다 크다면 (있다면) ?>
@ -140,9 +140,9 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<dd class="sod_bsk_dvr"><strong><?php echo number_format($send_cost); ?> 원</strong></dd>
<?php } ?>
<?php if ($tot_amount > 0) { ?>
<?php if ($tot_price > 0) { ?>
<dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원 <?php echo number_format($tot_point); ?> 점</strong></dd>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원 <?php echo number_format($tot_point); ?> 점</strong></dd>
<?php } ?>
</dl>
<?php } ?>

View File

@ -52,7 +52,7 @@ ob_start();
<tbody>
<?php
$tot_point = 0;
$tot_sell_amount = 0;
$tot_sell_price = 0;
$goods = $goods_it_id = "";
$goods_count = -1;
@ -144,8 +144,8 @@ ob_start();
}
}
$point = $sum['point'];
$sell_amount = $sum['price'];
$point = $sum['point'];
$sell_price = $sum['price'];
// 쿠폰
if($is_member) {
@ -157,7 +157,7 @@ ob_start();
and cp_used = '0'
and cp_start <= '".G4_TIME_YMD."'
and cp_end >= '".G4_TIME_YMD."'
and cp_minimum <= '$sell_amount'
and cp_minimum <= '$sell_price'
and (
( cp_method = '0' and cp_target = '{$row['it_id']}' )
OR
@ -175,9 +175,9 @@ ob_start();
<td>
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
<input type="hidden" name="it_amount[<?php echo $i; ?>]" value="<?php echo $sell_amount; ?>">
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $sell_price; ?>">
<input type="hidden" name="cp_id[<?php echo $i; ?>]" value="">
<input type="hidden" name="cp_amount[<?php echo $i; ?>]" value="0">
<input type="hidden" name="cp_price[<?php echo $i; ?>]" value="0">
<?php if($default['de_tax_flag_use']) { ?>
<input type="hidden" name="it_notax[<?php echo $i; ?>]" value="<?php echo $row['it_notax']; ?>">
<?php } ?>
@ -186,13 +186,13 @@ ob_start();
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
<td class="td_bignum"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_smallmng"><?php echo $cp_button; ?></td>
<td class="td_bignum"><span class="ct_sell_amount"><?php echo number_format($sell_amount); ?></span></td>
<td class="td_bignum"><span class="ct_sell_price"><?php echo number_format($sell_price); ?></span></td>
<td class="td_num"><?php echo number_format($sum['point']); ?></td>
</tr>
<?php
$tot_point += $point;
$tot_sell_amount += $sell_amount;
$tot_point += $point;
$tot_sell_price += $sell_price;
} // for 끝
if ($i == 0) {
@ -209,7 +209,7 @@ ob_start();
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
if ($tot_sell_price < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
@ -232,15 +232,15 @@ ob_start();
<dl id="sod_bsk_tot">
<dt class="sod_bsk_sell">주문</dt>
<dd class="sod_bsk_sell"><strong><?php echo number_format($tot_sell_amount); ?> 원</strong></dd>
<dd class="sod_bsk_sell"><strong><?php echo number_format($tot_sell_price); ?> 원</strong></dd>
<dt class="sod_bsk_coupon">쿠폰</dt>
<dd class="sod_bsk_coupon"><strong id="ct_tot_coupon">0 원</strong></dd>
<dt class="sod_bsk_dvr">배송비</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($send_cost); ?> 원</strong></dd>
<dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt">
<?php $tot_amount = $tot_sell_amount + $send_cost; // 총계 = 주문상품금액합계 + 배송비 ?>
<strong id="ct_tot_amount"><?php echo number_format($tot_amount); ?> 원</strong>
<?php $tot_price = $tot_sell_price + $send_cost; // 총계 = 주문상품금액합계 + 배송비 ?>
<strong id="ct_tot_price"><?php echo number_format($tot_price); ?> 원</strong>
</dd>
<dt class="sod_bsk_point">포인트</dt>
<dd class="sod_bsk_point"><strong><?php echo number_format($tot_point); ?> 점</strong></dd>
@ -256,7 +256,7 @@ ob_end_clean();
<form name="sm_form" method="POST" action="<?php echo G4_MSHOP_URL; ?>/kcp/order_approval_form.php">
<input type="hidden" name="good_name" value="<?php echo $goods; ?>">
<input type="hidden" name="good_mny" value="<?php echo $tot_amount ?>" >
<input type="hidden" name="good_mny" value="<?php echo $tot_price ?>" >
<input type="hidden" name="buyr_name" value="">
<input type="hidden" name="buyr_tel1" value="">
<input type="hidden" name="buyr_tel2" value="">
@ -339,8 +339,8 @@ ob_end_clean();
<div id="sod_frm">
<form name="forderform" method="post" action="<?php echo $order_action_url; ?>" autocomplete="off">
<input type="hidden" name="od_amount" value="<?php echo $tot_sell_amount; ?>">
<input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>">
<input type="hidden" name="od_price" value="<?php echo $tot_sell_price; ?>">
<input type="hidden" name="org_od_price" value="<?php echo $tot_sell_price; ?>">
<input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>">
<input type="hidden" name="od_send_cost2" value="0">
<input type="hidden" name="item_coupon" value="0">
@ -587,7 +587,7 @@ ob_end_clean();
<?php } ?>
<tr>
<th>총 주문금액</th>
<td><span id="od_tot_amount"><?php echo number_format($tot_amount); ?></span>원</td>
<td><span id="od_tot_price"><?php echo number_format($tot_price); ?></span>원</td>
</tr>
<tr>
<th>추가배송비</th>
@ -653,12 +653,12 @@ ob_end_clean();
if ($is_member && $config['cf_use_point'])
{
// 포인트 결제 사용 포인트보다 회원의 포인트가 크다면
if ($member['mb_point'] >= $default['de_point_settle'])
if ($member['mb_point'] >= $default['de_settle_min_point'])
{
$temp_point = (int)$default['de_settle_max_point'];
if($temp_point > (int)$tot_sell_amount)
$temp_point = (int)$tot_sell_amount;
if($temp_point > (int)$tot_sell_price)
$temp_point = (int)$tot_sell_price;
if($temp_point > (int)$member['mb_point'])
$temp_point = (int)$member['mb_point'];
@ -821,12 +821,12 @@ $(function() {
$(".cp_apply").live("click", function() {
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='f_cp_id[]']").val();
var amount = $el.find("input[name='f_cp_amt[]']").val();
var price = $el.find("input[name='f_cp_prc[]']").val();
var subj = $el.find("input[name='f_cp_subj[]']").val();
var sell_amount;
var sell_price;
if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
if(parseInt(price) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+price+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
return false;
}
}
@ -856,18 +856,18 @@ $(function() {
}
}
var $s_el = $cp_row_el.find(".ct_sell_amount");;
sell_amount = parseInt($cp_row_el.find("input[name^=it_amount]").val());
sell_amount = sell_amount - parseInt(amount);
if(sell_amount < 0) {
var $s_el = $cp_row_el.find(".ct_sell_price");;
sell_price = parseInt($cp_row_el.find("input[name^=it_price]").val());
sell_price = sell_price - parseInt(price);
if(sell_price < 0) {
alert("쿠폰할인금액이 상품 주문금액보다 크므로 쿠폰을 적용할 수 없습니다.");
return false;
}
$s_el.text(number_format(String(sell_amount)));
$s_el.text(number_format(String(sell_price)));
$cp_row_el.find("input[name^=cp_id]").val(cp_id);
$cp_row_el.find("input[name^=cp_amount]").val(amount);
$cp_row_el.find("input[name^=cp_price]").val(price);
calculate_total_amount();
calculate_total_price();
$("#it_coupon_frm").remove();
$cp_btn_el.text("변경").focus();
if(!$cp_row_el.find(".it_coupon_cancel").size())
@ -881,7 +881,7 @@ $(function() {
$(".it_coupon_cancel").live("click", function() {
coupon_cancel($(this).closest("tr"));
calculate_total_amount();
calculate_total_price();
$("#it_coupon_frm").remove();
$(this).closest("tr").find(".it_coupon_btn").text("적용").focus();
$(this).remove();
@ -890,10 +890,10 @@ $(function() {
$("#od_coupon_btn").click(function() {
$("#od_coupon_frm").remove();
var $this = $(this);
var amount = parseInt($("input[name=org_od_amount]").val());
var price = parseInt($("input[name=org_od_price]").val());
$.post(
"./ordercoupon.php",
{ amount: amount },
{ price: price },
function(data) {
$this.after(data);
}
@ -903,19 +903,19 @@ $(function() {
$(".od_cp_apply").live("click", function() {
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='o_cp_id[]']").val();
var amount = parseInt($el.find("input[name='o_cp_amt[]']").val());
var price = parseInt($el.find("input[name='o_cp_prc[]']").val());
var subj = $el.find("input[name='o_cp_subj[]']").val();
var send_cost = $("input[name=od_send_cost]").val();
var item_coupon = parseInt($("input[name=item_coupon]").val());
var od_amount = parseInt($("input[name=org_od_amount]").val()) - item_coupon;
var od_price = parseInt($("input[name=org_od_price]").val()) - item_coupon;
if(amount == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
if(price == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+price+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
return false;
}
}
if(od_amount - amount <= 0) {
if(od_price - price <= 0) {
alert("쿠폰할인금액이 주문금액보다 크므로 쿠폰을 적용할 수 없습니다.");
return false;
}
@ -924,10 +924,10 @@ $(function() {
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
$("input[name=od_amount]").val(od_amount - amount);
$("input[name=od_price]").val(od_price - price);
$("input[name=od_cp_id]").val(cp_id);
$("input[name=od_coupon]").val(amount);
calculate_order_amount();
$("input[name=od_coupon]").val(price);
calculate_order_price();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰변경").focus();
if(!$("#od_coupon_cancel").size())
@ -940,13 +940,13 @@ $(function() {
});
$("#od_coupon_cancel").live("click", function() {
var org_amount = $("input[name=org_od_amount]").val();
var org_price = $("input[name=org_od_price]").val();
var item_coupon = parseInt($("input[name=item_coupon]").val());
$("input[name=od_amount]").val(org_amount - item_coupon);
$("input[name=od_price]").val(org_price - item_coupon);
$("input[name=sc_cp_id]").val("");
$("input[name=od_coupon]").val(0);
$("input[name=od_send_coupon]").val(0);
calculate_order_amount();
calculate_order_price();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
@ -957,11 +957,11 @@ $(function() {
$("#sc_coupon_btn").click(function() {
$("#sc_coupon_frm").remove();
var $this = $(this);
var amount = parseInt($("input[name=od_amount]").val());
var price = parseInt($("input[name=od_price]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val());
$.post(
"./ordersendcostcoupon.php",
{ amount: amount, send_cost: send_cost },
{ price: price, send_cost: send_cost },
function(data) {
$this.after(data);
}
@ -971,19 +971,19 @@ $(function() {
$(".sc_cp_apply").live("click", function() {
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='s_cp_id[]']").val();
var amount = parseInt($el.find("input[name='s_cp_amt[]']").val());
var price = parseInt($el.find("input[name='s_cp_prc[]']").val());
var subj = $el.find("input[name='s_cp_subj[]']").val();
var send_cost = parseInt($("input[name=od_send_cost]").val());
if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
if(parseInt(price) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+price+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
return false;
}
}
$("input[name=sc_cp_id]").val(cp_id);
$("input[name=od_send_coupon]").val(amount);
calculate_order_amount();
$("input[name=od_send_coupon]").val(price);
calculate_order_price();
$("#sc_coupon_frm").remove();
$("#sc_coupon_btn").text("쿠폰변경").focus();
if(!$("#sc_coupon_cancel").size())
@ -997,7 +997,7 @@ $(function() {
$("#sc_coupon_cancel").live("click", function() {
$("input[name=od_send_coupon]").val(0);
calculate_order_amount();
calculate_order_price();
$("#sc_coupon_frm").remove();
$("#sc_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
@ -1074,39 +1074,39 @@ $(function() {
function coupon_cancel($el)
{
var $dup_sell_el = $el.find(".ct_sell_amount");
var $dup_amount_el = $el.find("input[name^=cp_amount]");
var org_sell_amount = $el.find("input[name^=it_amount]").val();
var $dup_sell_el = $el.find(".ct_sell_price");
var $dup_price_el = $el.find("input[name^=cp_price]");
var org_sell_price = $el.find("input[name^=it_price]").val();
$dup_sell_el.text(number_format(String(org_sell_amount)));
$dup_amount_el.val(0);
$dup_sell_el.text(number_format(String(org_sell_price)));
$dup_price_el.val(0);
$el.find("input[name^=cp_id]").val("");
}
function calculate_total_amount()
function calculate_total_price()
{
var $it_amt = $("input[name^=it_amount]");
var $cp_amt = $("input[name^=cp_amount]");
var tot_sell_amount = sell_amount = tot_cp_amount = 0;
var it_amount, cp_amount, it_notax;
var $it_prc = $("input[name^=it_price]");
var $cp_prc = $("input[name^=cp_price]");
var tot_sell_price = sell_price = tot_cp_price = 0;
var it_price, cp_price, it_notax;
var tot_mny = comm_tax_mny = comm_vat_mny = comm_free_mny = tax_mny = vat_mny = 0;
var send_cost = parseInt($("input[name=od_send_cost]").val());
$it_amt.each(function(index) {
it_amount = parseInt($(this).val());
cp_amount = parseInt($cp_amt.eq(index).val());
sell_amount += it_amount;
tot_cp_amount += cp_amount;
$it_prc.each(function(index) {
it_price = parseInt($(this).val());
cp_price = parseInt($cp_prc.eq(index).val());
sell_price += it_price;
tot_cp_price += cp_price;
});
tot_sell_amount = sell_amount - tot_cp_amount + send_cost;
tot_sell_price = sell_price - tot_cp_price + send_cost;
$("#ct_tot_coupon").text(number_format(String(tot_cp_amount))+" 원");
$("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원");
$("#ct_tot_coupon").text(number_format(String(tot_cp_price))+" 원");
$("#ct_tot_price").text(number_format(String(tot_sell_price))+" 원");
$("input[name=good_mny]").val(tot_sell_amount);
$("input[name=od_amount]").val(sell_amount - tot_cp_amount);
$("input[name=item_coupon]").val(tot_cp_amount);
$("input[name=good_mny]").val(tot_sell_price);
$("input[name=od_price]").val(sell_price - tot_cp_price);
$("input[name=item_coupon]").val(tot_cp_price);
$("input[name=od_coupon]").val(0);
$("input[name=od_send_coupon]").val(0);
<?php if($oc_cnt > 0) { ?>
@ -1127,19 +1127,19 @@ function calculate_total_amount()
<?php if($temp_point > 0 && $is_member) { ?>
calculate_temp_point();
<?php } ?>
calculate_order_amount();
calculate_order_price();
}
function calculate_order_amount()
function calculate_order_price()
{
var sell_amount = parseInt($("input[name=od_amount]").val());
var sell_price = parseInt($("input[name=od_price]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val());
var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
var send_coupon = parseInt($("input[name=od_send_coupon").val());
var tot_amount = sell_amount + send_cost + send_cost2 - send_coupon;
var tot_price = sell_price + send_cost + send_cost2 - send_coupon;
$("form[name=sm_form] input[name=good_mny]").val(tot_amount);
$("#od_tot_amount").text(number_format(String(tot_amount)));
$("form[name=sm_form] input[name=good_mny]").val(tot_price);
$("#od_tot_price").text(number_format(String(tot_price)));
<?php if($temp_point > 0 && $is_member) { ?>
calculate_temp_point();
<?php } ?>
@ -1147,14 +1147,14 @@ function calculate_order_amount()
function calculate_temp_point()
{
var sell_amount = parseInt($("input[name=od_amount]").val());
var sell_price = parseInt($("input[name=od_price]").val());
var mb_point = parseInt(<?php echo $member['mb_point']; ?>);
var max_point = parseInt(<?php echo $default['de_settle_max_point']; ?>);
var point_unit = parseInt(<?php echo $default['de_settle_point_unit']; ?>);
var temp_point = max_point;
if(temp_point > sell_amount)
temp_point = sell_amount;
if(temp_point > sell_price)
temp_point = sell_price;
if(temp_point > mb_point)
temp_point = mb_point;
@ -1174,17 +1174,17 @@ function calculate_sendcost(code)
$("input[name=od_send_cost2]").val(data);
$("#od_send_cost2").text(number_format(String(data)));
calculate_order_amount();
calculate_order_price();
}
);
}
function calculate_tax()
{
var $it_amt = $("input[name^=it_amount]");
var $cp_amt = $("input[name^=cp_amount]");
var sell_amount = tot_cp_amount = 0;
var it_amount, cp_amount, it_notax;
var $it_prc = $("input[name^=it_price]");
var $cp_prc = $("input[name^=cp_price]");
var sell_price = tot_cp_price = 0;
var it_price, cp_price, it_notax;
var tot_mny = comm_free_mny = tax_mny = vat_mny = 0;
var send_cost = parseInt($("input[name=od_send_cost]").val());
var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
@ -1192,16 +1192,16 @@ function calculate_tax()
var send_coupon = parseInt($("input[name=od_send_coupon]").val());
var temp_point = 0;
$it_amt.each(function(index) {
it_amount = parseInt($(this).val());
cp_amount = parseInt($cp_amt.eq(index).val());
sell_amount += it_amount;
tot_cp_amount += cp_amount;
$it_prc.each(function(index) {
it_price = parseInt($(this).val());
cp_price = parseInt($cp_prc.eq(index).val());
sell_price += it_price;
tot_cp_price += cp_price;
it_notax = $("input[name^=it_notax]").eq(index).val();
if(it_notax == "1") {
comm_free_mny += (it_amount - cp_amount);
comm_free_mny += (it_price - cp_price);
} else {
tot_mny += (it_amount - cp_amount);
tot_mny += (it_price - cp_price);
}
});
@ -1240,11 +1240,11 @@ function kcp_approval()
// pg 결제 금액에서 포인트 금액 차감
if(settle_method != "무통장") {
var od_amount = parseInt(pf.od_amount.value);
var od_price = parseInt(pf.od_price.value);
var send_cost = parseInt(pf.od_send_cost.value);
var send_cost2 = parseInt(pf.od_send_cost2.value);
var send_coupon = parseInt(pf.od_send_coupon.value);
f.good_mny.value = od_amount + send_cost + send_cost2 - send_coupon - temp_point;
f.good_mny.value = od_price + send_cost + send_cost2 - send_coupon - temp_point;
}
f.buyr_name.value = pf.od_name.value;
@ -1367,7 +1367,7 @@ function payment_check(f)
{
var temp_point = 0;
var max_point = 0;
var od_amount = parseInt(f.od_amount.value);
var od_price = parseInt(f.od_price.value);
var send_cost = parseInt(f.od_send_cost.value);
var send_cost2 = parseInt(f.od_send_cost2.value);
var send_coupon = parseInt(f.od_send_coupon.value);
@ -1387,7 +1387,7 @@ function payment_check(f)
return false;
}
if (temp_point > od_amount) {
if (temp_point > od_price) {
alert("상품 주문금액(배송비 제외) 보다 많이 포인트결제할 수 없습니다.");
f.od_temp_point.select();
return false;
@ -1413,11 +1413,11 @@ function payment_check(f)
}
}
var tot_amount = od_amount + send_cost + send_cost2 - send_coupon - temp_point;
var tot_price = od_price + send_cost + send_cost2 - send_coupon - temp_point;
if (document.getElementById("od_settle_iche")) {
if (document.getElementById("od_settle_iche").checked) {
if (tot_amount - temp_point < 150) {
if (tot_price - temp_point < 150) {
alert("계좌이체는 150원 이상 결제가 가능합니다.");
return false;
}
@ -1426,7 +1426,7 @@ function payment_check(f)
if (document.getElementById("od_settle_card")) {
if (document.getElementById("od_settle_card").checked) {
if (tot_amount - temp_point < 1000) {
if (tot_price - temp_point < 1000) {
alert("신용카드는 1000원 이상 결제가 가능합니다.");
return false;
}
@ -1435,7 +1435,7 @@ function payment_check(f)
if (document.getElementById("od_settle_hp")) {
if (document.getElementById("od_settle_hp").checked) {
if (tot_amount - temp_point < 350) {
if (tot_price - temp_point < 350) {
alert("휴대폰은 350원 이상 결제가 가능합니다.");
return false;
}

View File

@ -58,7 +58,7 @@ if ($error != "")
alert($error);
}
$i_amount = (int)$_POST['od_amount'];
$i_price = (int)$_POST['od_price'];
$i_send_cost = (int)$_POST['od_send_cost'];
$i_send_cost2 = (int)$_POST['od_send_cost2'];
$i_send_coupon = (int)$_POST['od_send_coupon'];
@ -66,22 +66,24 @@ $i_temp_point = (int)$_POST['od_temp_point'];
// 주문금액이 상이함
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_amount
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_price,
COUNT(distinct it_id) as cart_count
from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' ";
$row = sql_fetch($sql);
$tot_ct_amount = $row['od_amount'];
$tot_ct_price = $row['od_price'];
$cart_count = $row['cart_count'];
// 쿠폰금액계산
$tot_cp_amount = 0;
$tot_cp_price = 0;
if($is_member) {
// 상품쿠폰
$tot_it_cp_amount = $tot_od_cp_amount = 0;
$tot_it_cp_price = $tot_od_cp_price = 0;
$it_cp_cnt = count($_POST['cp_id']);
$arr_it_cp_amt = array();
$arr_it_cp_prc = array();
for($i=0; $i<$it_cp_cnt; $i++) {
$cid = $_POST['cp_id'][$i];
$it_id = $_POST['it_id'][$i];
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_amount, cp_trunc, cp_minimum, cp_maximum
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g4['shop_coupon_table']}
where cp_id = '$cid'
and mb_id = '{$member['mb_id']}'
@ -124,9 +126,9 @@ if($is_member) {
$dc = 0;
if($cp['cp_type']) {
$dc = floor(($item_price * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
$dc = floor(($item_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_amount'];
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
@ -135,15 +137,15 @@ if($is_member) {
if($item_price < $dc)
continue;
$tot_it_cp_amount += $dc;
$arr_it_cp_amt[$it_id] = $dc;
$tot_it_cp_price += $dc;
$arr_it_cp_prc[$it_id] = $dc;
}
$tot_od_amount = $tot_ct_amount - $tot_it_cp_amount;
$tot_od_price = $tot_ct_price - $tot_it_cp_price;
// 주문쿠폰
if($_POST['od_cp_id']) {
$sql = " select cp_id, cp_type, cp_amount, cp_trunc, cp_minimum, cp_maximum
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g4['shop_coupon_table']}
where cp_id = '{$_POST['od_cp_id']}'
and mb_id = '{$member['mb_id']}'
@ -154,33 +156,33 @@ if($is_member) {
$cp = sql_fetch($sql);
$dc = 0;
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_amount)) {
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($tot_od_amount * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
$dc = floor(($tot_od_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_amount'];
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
if($tot_od_amount < $dc)
if($tot_od_price < $dc)
die('Order coupon error.');
$tot_od_cp_amount = $dc;
$tot_od_amount -= $tot_od_cp_amount;
$tot_od_cp_price = $dc;
$tot_od_price -= $tot_od_cp_price;
}
}
$tot_cp_amount = $tot_it_cp_amount + $tot_od_cp_amount;
$tot_cp_price = $tot_it_cp_price + $tot_od_cp_price;
}
if ((int)($row['od_amount'] - $tot_cp_amount) !== $i_amount) {
if ((int)($row['od_price'] - $tot_cp_price) !== $i_price) {
die("Error.");
}
// 배송비가 상이함
$tot_sell_amount = $row['od_amount'];
$tot_sell_price = $row['od_price'];
// 배송비 계산
if ($default['de_send_cost_case'] == '없음') {
$send_cost = 0;
@ -191,7 +193,7 @@ if ($default['de_send_cost_case'] == '없음') {
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
if ($tot_sell_price < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
@ -217,11 +219,11 @@ if ($default['de_send_cost_case'] == '없음') {
}
}
$tot_sc_cp_amount = 0;
$tot_sc_cp_price = 0;
if($is_member && $send_cost > 0) {
// 배송쿠폰
if($_POST['sc_cp_id']) {
$sql = " select cp_id, cp_type, cp_amount, cp_trunc, cp_minimum, cp_maximum
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g4['shop_coupon_table']}
where cp_id = '{$_POST['sc_cp_id']}'
and mb_id = '{$member['mb_id']}'
@ -232,11 +234,11 @@ if($is_member && $send_cost > 0) {
$cp = sql_fetch($sql);
$dc = 0;
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_amount)) {
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($send_cost * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
$dc = floor(($send_cost * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_amount'];
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
@ -245,23 +247,23 @@ if($is_member && $send_cost > 0) {
if($dc > $send_cost)
$dc = $send_cost;
$tot_sc_cp_amount = $dc;
$tot_sc_cp_price = $dc;
}
}
}
if ((int)($send_cost - $tot_sc_cp_amount) !== (int)($i_send_cost - $i_send_coupon)) {
if ((int)($send_cost - $tot_sc_cp_price) !== (int)($i_send_cost - $i_send_coupon)) {
die("Error..");
}
// 추가배송비가 상이함
$zipcode = $od_b_zip1 . $od_b_zip2;
$sql = " select sc_id, sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$sql = " select sc_id, sc_price from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$tmp = sql_fetch($sql);
if(!$tmp['sc_id'])
$send_cost2 = 0;
else
$send_cost2 = (int)$tmp['sc_amount'];
$send_cost2 = (int)$tmp['sc_price'];
if($send_cost2 !== $i_send_cost2)
die("Error...");
@ -273,8 +275,8 @@ if ($is_member && $config['cf_use_point'])
if($member['mb_point'] >= $default['de_settle_min_point']) {
$temp_point = (int)$default['de_settle_max_point'];
if($temp_point > (int)$tot_od_amount)
$temp_point = (int)$tot_od_amount;
if($temp_point > (int)$tot_od_price)
$temp_point = (int)$tot_od_price;
if($temp_point > (int)$member['mb_point'])
$temp_point = (int)$member['mb_point'];
@ -293,12 +295,13 @@ if ($od_temp_point)
alert('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.');
}
$i_amount = $i_amount + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
if ($od_settle_case == "무통장")
{
$od_receipt_point = $i_temp_point;
$od_receipt_amount = 0;
$od_receipt_price = 0;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_ORDER;
}
else if ($od_settle_case == "계좌이체")
@ -306,14 +309,15 @@ else if ($od_settle_case == "계좌이체")
include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$od_tno = $tno;
$od_receipt_amount = $amount;
$od_receipt_price = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_bank_account = $od_settle_case;
$od_deposit_name = $od_name;
$bank_name = iconv("cp949", "utf8", $bank_name);
$od_bank_account = $bank_name;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_SETTLE;
}
else if ($od_settle_case == "가상계좌")
@ -322,12 +326,13 @@ else if ($od_settle_case == "가상계좌")
$od_receipt_point = $i_temp_point;
$od_tno = $tno;
$od_receipt_amount = 0;
$od_receipt_price = 0;
$bankname = iconv("cp949", "utf8", $bankname);
$depositor = iconv("cp949", "utf8", $depositor);
$od_bank_account = $bankname.' '.$account.' '.$depositor;
$od_deposit_name = $od_name;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_ORDER;
}
else if ($od_settle_case == "휴대폰")
@ -335,11 +340,12 @@ else if ($od_settle_case == "휴대폰")
include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$od_tno = $tno;
$od_receipt_amount = $amount;
$od_receipt_price = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_bank_account = $commid.' '.$mobile_no;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_SETTLE;
}
else if ($od_settle_case == "신용카드")
@ -348,12 +354,13 @@ else if ($od_settle_case == "신용카드")
$od_tno = $tno;
$od_app_no = $app_no;
$od_receipt_amount = $amount;
$od_receipt_price = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$card_name = iconv("cp949", "utf8", $card_name);
$od_bank_account = $card_name;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_SETTLE;
}
else
@ -363,7 +370,7 @@ else
// 주문금액과 결제금액이 일치하는지 체크
if($tno) {
if((int)$i_amount !== (int)$pg_amount) {
if((int)$i_price !== (int)$pg_price) {
$cancel_msg = '결제금액 불일치';
include G4_MSHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
@ -384,8 +391,8 @@ if($escw_yn == 'Y')
$od_escrow = 1;
// 복합과세 금액
$od_tax_mny = round($i_amount / 1.1);
$od_vat_mny = $i_amount - $od_tax_mny;
$od_tax_mny = round($i_price / 1.1);
$od_vat_mny = $i_price - $od_tax_mny;
$od_free_mny = 0;
if($default['de_tax_flag_use']) {
$od_tax_mny = (int)$_POST['comm_tax_mny'];
@ -415,17 +422,18 @@ $sql = " insert {$g4['shop_order_table']}
od_b_addr2 = '$od_b_addr2',
od_deposit_name = '$od_deposit_name',
od_memo = '$od_memo',
od_cart_count = '$tot_ct_count',
od_cart_amount = '$tot_ct_amount',
od_cart_coupon = '$tot_it_cp_amount',
od_cart_count = '$cart_count',
od_cart_price = '$tot_ct_price',
od_cart_coupon = '$tot_it_cp_price',
od_send_cost = '$od_send_cost',
od_send_coupon = '$tot_sc_cp_amount',
od_send_coupon = '$tot_sc_cp_price',
od_send_cost2 = '$od_send_cost2',
od_coupon = '$tot_od_cp_amount',
od_receipt_amount = '$od_receipt_amount',
od_coupon = '$tot_od_cp_price',
od_receipt_price = '$od_receipt_price',
od_receipt_point = '$od_receipt_point',
od_bank_account = '$od_bank_account',
od_receipt_time = '$od_receipt_time',
od_misu = '$od_misu',
od_tno = '$od_tno',
od_app_no = '$od_app_no',
od_escrow = '$od_escrow',
@ -460,7 +468,7 @@ if(!$result) {
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_amount > 0 && !$default['de_card_point']) {
if ($od_receipt_price > 0 && !$default['de_card_point']) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update {$g4['shop_cart_table']}
@ -510,9 +518,9 @@ if($is_member) {
sql_query($sql);
// 쿠폰사용금액 cart에 기록
$cp_amt = (int)$arr_it_cp_amt[$cp_it_id];
$cp_prc = (int)$arr_it_cp_prc[$cp_it_id];
$sql = " update {$g4['shop_cart_table']}
set cp_amount = '$cp_amt'
set cp_price = '$cp_prc'
where od_id = '$od_id'
and it_id = '$cp_it_id'
and ct_select = '1'
@ -570,7 +578,7 @@ if($default['de_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3']
$sms_content = preg_replace("/{보낸분}/", $od_name, $sms_content);
$sms_content = preg_replace("/{받는분}/", $od_b_name, $sms_content);
$sms_content = preg_replace("/{주문번호}/", $od_id, $sms_content);
$sms_content = preg_replace("/{주문금액}/", number_format($ttotal_amount), $sms_content);
$sms_content = preg_replace("/{주문금액}/", number_format($$tot_ct_price), $sms_content);
$sms_content = preg_replace("/{회원아이디}/", $member['mb_id'], $sms_content);
$sms_content = preg_replace("/{회사명}/", $default['de_admin_company_name'], $sms_content);

View File

@ -18,10 +18,9 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
</thead>
<tbody>
<?php
$sql = " select a.od_id,
a.*, "._MISU_QUERY_."
from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (b.od_id=a.od_id)
$sql = " select *,
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
from {$g4['shop_order_table']}
where a.mb_id = '{$member['mb_id']}'
group by a.od_id
order by a.od_id desc
@ -38,9 +37,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<a href="<?php echo G4_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&amp;uid=<?php echo $uid; ?>"><?php echo $row['od_id']; ?></a>
</td>
<td class="td_datetime"><?php echo substr($row['od_time'],0,16); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
<td class="td_bignum"><?php echo display_price($row['orderamount']); ?></td>
<td class="td_bignum"><?php echo display_price($row['couponamount']); ?></td>
<td class="td_stat"><?php echo display_price($row['receiptamount']); ?></td>
<td class="td_bignum"><?php echo display_price($row['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2']); ?></td>
<td class="td_bignum"><?php echo display_price($row['couponprice']); ?></td>
<td class="td_stat"><?php echo display_price($row['od_receipt_price']); ?></td>
</tr>
<?php

View File

@ -41,7 +41,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<dd>상품 배송이 완료되었습니다.</dd>
</dl>
<?php
$sql = " select it_id, it_name, cp_amount
$sql = " select it_id, it_name, cp_price
from {$g4['shop_cart_table']}
where od_id = '$od_id'
group by it_id
@ -85,7 +85,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
else
$opt_price = $opt['ct_price'] + $opt['io_price'];
$sell_amount = $opt_price * $opt['ct_qty'];
$sell_price = $opt_price * $opt['ct_qty'];
$point = $opt['ct_point'] * $opt['ct_qty'];
$ct_list[$opt['ct_id']]['name'] = $opt['it_name'];
@ -95,7 +95,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<td><?php echo $opt['ct_option']; ?></td>
<td class="td_smallmng"><?php echo number_format($opt['ct_qty']); ?></td>
<td class="td_bignum"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($sell_amount); ?></td>
<td class="td_num"><?php echo number_format($sell_price); ?></td>
<td class="td_num"><?php echo number_format($point); ?></td>
<td class="td_smallmng"><?php echo $opt['ct_status']; ?></td>
</tr>
@ -113,12 +113,12 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<?php
// 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 - 배송비할인
$tot_amount = $od['od_cart_amount'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon'];
$tot_price = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon'];
?>
<dl id="sod_bsk_tot">
<dt class="sod_bsk_dvr">주문총액</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_cart_amount']); ?> 원</strong></dd>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_cart_price']); ?> 원</strong></dd>
<?php if($od['od_cart_coupon'] > 0) { ?>
<dt class="sod_bsk_dvr">상품할인</dt>
@ -146,7 +146,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<?php } ?>
<dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원</strong></dd>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원</strong></dd>
<dt class="sod_bsk_point">포인트</dt>
<dd class="sod_bsk_point"><strong><?php echo number_format($tot_point); ?> 점</strong></dd>
@ -157,30 +157,28 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<div id="sod_fin_view">
<h2>결제/배송 정보</h2>
<?php
$receipt_amount = $od['od_receipt_amount']
+ $od['od_receipt_point']
- $od['od_cancel_amount'];
$receipt_price = $od['od_receipt_price']
+ $od['od_receipt_point'];
$cancel_price = $od['od_cancel_price'];
$misu = true;
if ($tot_amount - $tot_cancel_amount == $receipt_amount) {
if ($tot_price - $cancel_price == $receipt_price) {
$wanbul = " (완불)";
$misu = false; // 미수금 없음
}
else
{
$wanbul = display_price($receipt_amount);
$wanbul = display_price($receipt_price);
}
// 120615 : 취소된 값을 두번 빼주는 결과가 되어 코드 수정 (군포돼지님)
//$misu_amount = $tot_amount - $tot_cancel_amount - $receipt_amount - $od[od_dc_amount];
$misu_amount = $tot_amount - $receipt_amount - $od['od_dc_amount'];
$misu_price = $tot_price - $receipt_price - $cancel_price;
// 결제정보처리
if($od['od_receipt_amount'] > 0)
$od_receipt_amount = display_price($od['od_receipt_amount']);
if($od['od_receipt_price'] > 0)
$od_receipt_price = display_price($od['od_receipt_price']);
else
$od_receipt_amount = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$od_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$app_no_subj = '';
$disp_bank = true;
@ -225,10 +223,10 @@ include_once(G4_MSHOP_PATH.'/_head.php');
</tr>
<tr>
<th scope="row">결제금액</th>
<td><?php echo $od_receipt_amount; ?></td>
<td><?php echo $od_receipt_price; ?></td>
</tr>
<?php
if($od['od_receipt_amount'] > 0)
if($od['od_receipt_price'] > 0)
{
?>
<tr>
@ -301,12 +299,12 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<?php
}
if ($od['od_cancel_amount'] > 0)
if ($od['od_cancel_price'] > 0)
{
?>
<tr>
<th scope="row">취소/환불 금액</th>
<td><?php echo display_price($od['od_cancel_amount']); ?></td>
<td><?php echo display_price($od['od_cancel_price']); ?></td>
</tr>
<?php
}
@ -314,7 +312,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
// 현금영수증 발급을 사용하는 경우에만
if ($default['de_taxsave_use'] && $default['de_card_pg'] == 'kcp') {
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
if ($misu_amount == 0 && $od['od_receipt_amount'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
if ($misu_price == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
?>
<tr>
<th scope="row">현금영수증</th>
@ -477,19 +475,13 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<ul>
<li>
총 구매액
<strong><?php echo display_price($tot_amount); ?></strong>
<strong><?php echo display_price($tot_price); ?></strong>
</li>
<?php
if ($od['od_dc_amount'] > 0) {
echo '<li>';
echo '할인액'.PHP_EOL;
echo '<strong>'.display_price($od['od_dc_amount']).'</strong>';
echo '</li>';
}
if ($misu_amount > 0) {
if ($misu_price > 0) {
echo '<li>';
echo '미결제액'.PHP_EOL;
echo '<strong>'.display_price($misu_amount).'</strong>';
echo '<strong>'.display_price($misu_price).'</strong>';
echo '</li>';
}
?>
@ -504,8 +496,8 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<h2>주문취소</h2>
<?php
// 취소한 내역이 없다면
if ($tot_cancel_amount == 0) {
if (!$rq_cnt && $od_count1 == $od_count2 && ($od['od_settle_case'] != '가상계좌' || $od['od_receipt_amount'] == 0)) {
if ($cancel_price == 0) {
if ($od['od_settle_case'] != '가상계좌' || $od['od_receipt_price'] == 0) {
?>
<button type="button" onclick="document.getElementById('sod_fin_cancelfrm').style.display='block';">주문 취소하기</button>
@ -523,7 +515,6 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<?php
}
} else {
$misu_amount = $misu_amount - $send_cost;
?>
<p>주문 취소, 반품, 품절된 내역이 있습니다.</p>
<?php } ?>

View File

@ -1,7 +1,7 @@
<?php
include_once('./_common.php');
$sql = " select * from {$g4['shop_personalpay_table']} where pp_id = '$pp_id' and pp_use = '1' and pp_amount > 0 ";
$sql = " select * from {$g4['shop_personalpay_table']} where pp_id = '$pp_id' and pp_use = '1' and pp_price > 0 ";
$pp = sql_fetch($sql);
if(!$pp['pp_id'])
@ -23,7 +23,7 @@ $ipgm_date = date("Ymd", (G4_SERVER_TIME + 86400 * 5));
$tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정(갤럭시탭,아이패드 - 1.85, 스마트폰 - 1.0)
// 개인결제 체크를 위한 hash
$hash_data = md5($pp['pp_id'].$pp['pp_amount'].$pp['pp_time']);
$hash_data = md5($pp['pp_id'].$pp['pp_price'].$pp['pp_time']);
set_session('ss_personalpay_id', $pp['pp_id']);
set_session('ss_personalpay_hash', $hash_data);
@ -33,7 +33,7 @@ if($default['de_escrow_use']) {
$good_info .= "ordr_numb={$pp_id}_".sprintf("%04d", 1).chr(31);
$good_info .= "good_name=".addslashes($pp['pp_name'].'님 개인결제').chr(31);
$good_info .= "good_cntx=1".chr(31);
$good_info .= "good_amtx=".$pp['pp_amount'].chr(31);
$good_info .= "good_amtx=".$pp['pp_price'].chr(31);
}
?>
@ -43,7 +43,7 @@ if($default['de_escrow_use']) {
<form name="sm_form" method="POST" action="<?php echo G4_MSHOP_URL; ?>/kcp/personalpay_approval_form.php">
<input type="hidden" name="good_name" value="<?php echo $pp['pp_name'].'님 개인결제'; ?>">
<input type="hidden" name="good_mny" value="<?php echo $pp['pp_amount']; ?>" >
<input type="hidden" name="good_mny" value="<?php echo $pp['pp_price']; ?>" >
<input type="hidden" name="buyr_name" value="">
<input type="hidden" name="buyr_tel1" value="">
<input type="hidden" name="buyr_tel2" value="">
@ -111,7 +111,7 @@ if($default['de_escrow_use']) {
<tbody>
<tr>
<th>결제금액</th>
<td><?php echo display_price($pp['pp_amount']); ?></td>
<td><?php echo display_price($pp['pp_price']); ?></td>
</tr>
<tr>
<th scope="row"><label for="pp_name">이름</label></th>
@ -346,11 +346,11 @@ function payfield_check(f)
// 결제체크
function payment_check(f)
{
var tot_amount = <?php echo (int)$pp['pp_amount']; ?>;
var tot_price = <?php echo (int)$pp['pp_price']; ?>;
if (document.getElementById("pp_settle_iche")) {
if (document.getElementById("pp_settle_iche").checked) {
if (tot_amount < 150) {
if (tot_price < 150) {
alert("계좌이체는 150원 이상 결제가 가능합니다.");
return false;
}
@ -359,7 +359,7 @@ function payment_check(f)
if (document.getElementById("pp_settle_card")) {
if (document.getElementById("pp_settle_card").checked) {
if (tot_amount < 1000) {
if (tot_price < 1000) {
alert("신용카드는 1000원 이상 결제가 가능합니다.");
return false;
}
@ -368,7 +368,7 @@ function payment_check(f)
if (document.getElementById("pp_settle_hp")) {
if (document.getElementById("pp_settle_hp").checked) {
if (tot_amount < 350) {
if (tot_price < 350) {
alert("휴대폰은 350원 이상 결제가 가능합니다.");
return false;
}

View File

@ -20,7 +20,7 @@ $pp = sql_fetch($sql);
if(!$pp['pp_id'])
alert('개인결제 정보가 존재하지 않습니다.');
if($pp['pp_receipt_amount'] > 0)
if($pp['pp_tno'])
alert('이미 결제하신 개인결제 내역입니다.');
$hash_data = md5($_POST['pp_id'].$_POST['good_mny'].$pp['pp_time']);
@ -32,45 +32,45 @@ if ($pp_settle_case == "계좌이체")
include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = $amount;
$pp_receipt_price = $amount;
$pp_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$pp_deposit_name = $pp_name;
$bank_name = iconv("cp949", "utf8", $bank_name);
$pp_bank_account = $bank_name;
$pg_amount = $amount;
$pg_price = $amount;
}
else if ($pp_settle_case == "가상계좌")
{
include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = 0;
$pp_receipt_price = 0;
$bankname = iconv("cp949", "utf8", $bankname);
$depositor = iconv("cp949", "utf8", $depositor);
$pp_bank_account = $bankname.' '.$account.' '.$depositor;
$pp_deposit_name = $depositor;
$pg_amount = $amount;
$pg_price = $amount;
}
else if ($pp_settle_case == "휴대폰")
{
include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = $amount;
$pp_receipt_price = $amount;
$pp_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$pp_bank_account = $commid.' '.$mobile_no;
$pg_amount = $amount;
$pg_price = $amount;
}
else if ($pp_settle_case == "신용카드")
{
include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = $amount;
$pp_receipt_price = $amount;
$pp_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$card_name = iconv("cp949", "utf8", $card_name);
$pp_bank_account = $card_name;
$pg_amount = $amount;
$pg_price = $amount;
}
else
{
@ -78,7 +78,7 @@ else
}
// 주문금액과 결제금액이 일치하는지 체크
if((int)$pp['pp_amount'] !== (int)$pg_amount) {
if((int)$pp['pp_price'] !== (int)$pg_price) {
$cancel_msg = '결제금액 불일치';
include G4_MSHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
@ -94,7 +94,7 @@ else
$sql = " update {$g4['shop_personalpay_table']}
set pp_tno = '$pp_tno',
pp_app_no = '$app_no',
pp_receipt_amount = '$pp_receipt_amount',
pp_receipt_price = '$pp_receipt_price',
pp_settle_case = '$pp_settle_case',
pp_bank_account = '$pp_bank_account',
pp_deposit_name = '$pp_deposit_name',
@ -114,13 +114,13 @@ if(!$result) {
}
// 주문번호가 있으면 결제정보 반영
if($pp_receipt_amount > 0 && $pp['pp_id'] && $pp['od_id']) {
if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
$od_escrow = 0;
if($escw_yn == 'Y')
$od_escrow = 1;
$sql = " update {$g4['shop_order_table']}
set od_receipt_amount = od_receipt_amount + '$pp_receipt_amount',
set od_receipt_price = od_receipt_price + '$pp_receipt_price',
od_receipt_time = '$pp_receipt_time',
od_tno = '$pp_tno',
od_app_no = '$app_no',

View File

@ -23,22 +23,22 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<?php
$misu = true;
if ($pp['pp_amount'] == $pp['pp_receipt_amount']) {
if ($pp['pp_price'] == $pp['pp_receipt_price']) {
$wanbul = " (완불)";
$misu = false; // 미수금 없음
}
else
{
$wanbul = display_price($pp['pp_receipt_amount']);
$wanbul = display_price($pp['pp_receipt_price']);
}
$misu_amount = $pp['pp_amount'] - $pp['pp_receipt_amount'];
$misu_price = $pp['pp_price'] - $pp['pp_receipt_price'];
// 결제정보처리
if($pp['pp_receipt_amount'] > 0)
$pp_receipt_amount = display_price($pp['pp_receipt_amount']);
if($pp['pp_receipt_price'] > 0)
$pp_receipt_price = display_price($pp['pp_receipt_price']);
else
$pp_receipt_amount = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$pp_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$app_no_subj = '';
$disp_bank = true;
@ -78,10 +78,10 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<th scope="row">결제방식</th>
<td><?php echo $pp['pp_settle_case']; ?></td>
</tr>
<?php if($pp_receipt_amount > 0) { ?>
<?php if($pp['pp_receipt_price'] > 0) { ?>
<tr>
<th scope="row">결제금액</th>
<td><?php echo $pp_receipt_amount; ?></td>
<td><?php echo $pp_receipt_price; ?></td>
</tr>
<tr>
<th scope="row">결제일시</th>
@ -153,13 +153,13 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<ul>
<li>
총 주문액
<strong><?php echo display_price($pp['pp_amount']); ?></strong>
<strong><?php echo display_price($pp['pp_price']); ?></strong>
</li>
<?php
if ($misu_amount > 0) {
if ($misu_price > 0) {
echo '<li>';
echo '미결제액'.PHP_EOL;
echo '<strong>'.display_price($misu_amount).'</strong>';
echo '<strong>'.display_price($misu_price).'</strong>';
echo '</li>';
}
?>

View File

@ -25,7 +25,7 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
<a href="<?php echo $href; ?>" class="sct_a">
<span class="sct_img"><img src="<?php echo G4_MSHOP_SKIN_URL; ?>/img/personal.jpg" alt=""></span>
<b><?php echo get_text($row['pp_name']).'님 개인결제'; ?></b>
<span class="sct_cost"><?php echo display_price($row['pp_amount']); ?></span>
<span class="sct_cost"><?php echo display_price($row['pp_price']); ?></span>
</a>
</li>
<?php

View File

@ -44,8 +44,7 @@ include_once('./_head.php');
<tbody>
<?php
$tot_point = 0;
$tot_sell_amount = 0;
$tot_cancel_amount = 0;
$tot_sell_price = 0;
// $s_cart_id 로 현재 장바구니 자료 쿼리
$sql = " select a.ct_id,
@ -102,8 +101,8 @@ include_once('./_head.php');
$it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']);
}
$point = $sum['point'];
$sell_amount = $sum['price'];
$point = $sum['point'];
$sell_price = $sum['price'];
?>
<tr>
@ -115,7 +114,7 @@ include_once('./_head.php');
</td>
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
<td class="td_bignum"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_bignum"><span id="sell_amount_<?php echo $i; ?>"><?php echo number_format($sell_amount); ?></span></td>
<td class="td_bignum"><span id="sell_price_<?php echo $i; ?>"><?php echo number_format($sell_price); ?></span></td>
<td class="td_bignum"><?php echo number_format($point); ?></td>
<td class="td_chk">
<label for="ct_chk_<?php echo $i; ?>" class="sound_only">상품</label>
@ -124,13 +123,8 @@ include_once('./_head.php');
</tr>
<?php
if ($row['ct_status'] == '취소' || $row['ct_status'] == '반품' || $row['ct_status'] == '품절') {
$tot_cancel_amount += $sell_amount;
}
else {
$tot_point += $point;
$tot_sell_amount += $sell_amount;
}
$tot_point += $point;
$tot_sell_price += $sell_price;
} // for 끝
if ($i == 0) {
@ -146,7 +140,7 @@ include_once('./_head.php');
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
if ($tot_sell_price < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
@ -160,8 +154,8 @@ include_once('./_head.php');
</table>
<?php
$tot_amount = $tot_sell_amount + $send_cost; // 총계 = 주문상품금액합계 + 배송비
if ($tot_amount > 0 || $send_cost > 0) {
$tot_price = $tot_sell_price + $send_cost; // 총계 = 주문상품금액합계 + 배송비
if ($tot_price > 0 || $send_cost > 0) {
?>
<dl id="sod_bsk_tot">
<?php if ($send_cost > 0) { // 배송비가 0 보다 크다면 (있다면) ?>
@ -170,11 +164,11 @@ include_once('./_head.php');
<?php } ?>
<?php
if ($tot_amount > 0) {
if ($tot_price > 0) {
?>
<dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원 <?php echo number_format($tot_point); ?> 점</strong></dd>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원 <?php echo number_format($tot_point); ?> 점</strong></dd>
<?php } ?>
</dl>

View File

@ -7,7 +7,7 @@ if ($is_guest)
$g4['title'] = $member['mb_nick'].' 님의 쿠폰 내역';
include_once(G4_PATH.'/head.sub.php');
$sql = " select cp_id, cp_subject, cp_method, cp_target, cp_start, cp_end, cp_type, cp_amount
$sql = " select cp_id, cp_subject, cp_method, cp_target, cp_start, cp_end, cp_type, cp_price
from {$g4['shop_coupon_table']}
where mb_id = '{$member['mb_id']}'
and cp_used = '0'
@ -52,14 +52,14 @@ if(!$count)
}
if($row['cp_type'])
$cp_amount = $row['cp_amount'].'%';
$cp_price = $row['cp_price'].'%';
else
$cp_amount = number_format($row['cp_amount']).'원';
$cp_price = number_format($row['cp_price']).'원';
?>
<tr>
<td><?php echo $row['cp_subject']; ?></td>
<td><?php echo $cp_target; ?></td>
<td class="td_bignum"><?php echo $cp_amount; ?></td>
<td class="td_bignum"><?php echo $cp_price; ?></td>
<td class="td_datetime"><?php echo substr($row['cp_start'], 2, 8); ?> ~ <?php echo substr($row['cp_end'], 2, 8); ?></td>
</tr>
<?php

View File

@ -62,7 +62,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">승인금액</th>
<td style="<?php echo $td_st; ?>"><?php echo $card_list['od_receipt_amount']; ?></td>
<td style="<?php echo $td_st; ?>"><?php echo $card_list['od_receipt_price']; ?></td>
</tr>
</tbody>
</table>
@ -83,7 +83,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">입금액</th>
<td style="<?php echo $td_st; ?>"><?php echo $bank_list['od_receipt_amount']; ?></td>
<td style="<?php echo $td_st; ?>"><?php echo $bank_list['od_receipt_price']; ?></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">입금자명</th>

View File

@ -50,7 +50,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">소계</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($list[$i]['stotal_amount']); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($list[$i]['stotal_price']); ?></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">포인트</th>
@ -74,7 +74,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<tr>
<th scope="row" style="<?php echo $th_st; ?>">주문합계</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_amount); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_price); ?></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">포인트합계</th>
@ -97,17 +97,17 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<?php } ?>
<?php if ($od_receipt_amount > 0 && $od_settle_case == '신용카드') { ?>
<?php if ($od_receipt_price > 0 && $od_settle_case == '신용카드') { ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">신용카드 입금액</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_amount); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_price); ?></td>
</tr>
<?php } ?>
<?php if ($od_receipt_amount > 0 && $od_settle_case == '계좌이체') { ?>
<?php if ($od_receipt_price > 0 && $od_settle_case == '계좌이체') { ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>"><?php echo $od_settle_case; ?> 입금액</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_amount); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_price); ?></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">계좌번호</th>
@ -119,7 +119,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<?php } ?>
<?php if (!$od_receipt_point && !$od_receipt_amount) { ?>
<?php if (!$od_receipt_point && !$od_receipt_price) { ?>
<tr>
<td colspan="2" style="<?php echo $empty_st; ?>">결제정보가 없습니다.</td>
</tr>

View File

@ -50,7 +50,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">소계</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($list[$i]['stotal_amount']); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($list[$i]['stotal_price']); ?></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">포인트</th>
@ -74,7 +74,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
<tr>
<th scope="row" style="<?php echo $th_st; ?>">주문합계</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_amount); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_price); ?></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">포인트합계</th>
@ -97,17 +97,17 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<?php } ?>
<?php if ($od_receipt_amount > 0 && $od_settle_case == '신용카드') { ?>
<?php if ($od_receipt_price > 0 && $od_settle_case == '신용카드') { ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">신용카드 입금액</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_amount); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_price); ?></td>
</tr>
<?php } ?>
<?php if ($od_receipt_amount > 0 && $od_settle_case == '계좌이체') { ?>
<?php if ($od_receipt_price > 0 && $od_settle_case == '계좌이체') { ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>"><?php echo $od_settle_case; ?> 입금액</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_amount); ?></td>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_receipt_price); ?></td>
</tr>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">계좌번호</th>
@ -119,7 +119,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr>
<?php } ?>
<?php if (!$od_receipt_point && !$od_receipt_amount) { ?>
<?php if (!$od_receipt_point && !$od_receipt_price) { ?>
<tr>
<td colspan="2" style="<?php echo $empty_st; ?>">결제정보가 없습니다.</td>
</tr>

View File

@ -4,7 +4,7 @@ include_once('./_common.php');
if($is_guest)
exit;
$amount = $_POST['amount'];
$price = $_POST['price'];
// 쿠폰정보
$sql = " select *
@ -14,7 +14,7 @@ $sql = " select *
and cp_start <= '".G4_TIME_YMD."'
and cp_end >= '".G4_TIME_YMD."'
and cp_used = '0'
and cp_minimum <= '$amount' ";
and cp_minimum <= '$price' ";
$result = sql_query($sql);
$count = mysql_num_rows($result);
?>
@ -36,9 +36,9 @@ $count = mysql_num_rows($result);
for($i=0; $row=sql_fetch_array($result); $i++) {
$dc = 0;
if($row['cp_type']) {
$dc = floor(($amount * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
$dc = floor(($price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
} else {
$dc = $row['cp_amount'];
$dc = $row['cp_price'];
}
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
@ -47,7 +47,7 @@ $count = mysql_num_rows($result);
<tr>
<td>
<input type="hidden" name="o_cp_id[]" value="<?php echo $row['cp_id']; ?>">
<input type="hidden" name="o_cp_amt[]" value="<?php echo $dc; ?>">
<input type="hidden" name="o_cp_prc[]" value="<?php echo $dc; ?>">
<input type="hidden" name="o_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
<?php echo get_text($row['cp_subject']); ?>
</td>

View File

@ -142,7 +142,7 @@ function get_intall_file()
<tbody>
<?php
$tot_point = 0;
$tot_sell_amount = 0;
$tot_sell_price = 0;
$goods = $goods_it_id = "";
$goods_count = -1;
@ -232,8 +232,8 @@ function get_intall_file()
}
}
$point = $sum['point'];
$sell_amount = $sum['price'];
$point = $sum['point'];
$sell_price = $sum['price'];
// 쿠폰
if($is_member) {
@ -245,7 +245,7 @@ function get_intall_file()
and cp_used = '0'
and cp_start <= '".G4_TIME_YMD."'
and cp_end >= '".G4_TIME_YMD."'
and cp_minimum <= '$sell_amount'
and cp_minimum <= '$sell_price'
and (
( cp_method = '0' and cp_target = '{$row['it_id']}' )
OR
@ -263,9 +263,9 @@ function get_intall_file()
<td>
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
<input type="hidden" name="it_name[<?php echo $i; ?>]" value="<?php echo get_text($row['it_name']); ?>">
<input type="hidden" name="it_amount[<?php echo $i; ?>]" value="<?php echo $sell_amount; ?>">
<input type="hidden" name="it_price[<?php echo $i; ?>]" value="<?php echo $sell_price; ?>">
<input type="hidden" name="cp_id[<?php echo $i; ?>]" value="">
<input type="hidden" name="cp_amount[<?php echo $i; ?>]" value="0">
<input type="hidden" name="cp_price[<?php echo $i; ?>]" value="0">
<?php if($default['de_tax_flag_use']) { ?>
<input type="hidden" name="it_notax[<?php echo $i; ?>]" value="<?php echo $row['it_notax']; ?>">
<?php } ?>
@ -274,13 +274,13 @@ function get_intall_file()
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
<td class="td_bignum"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_smallmng"><?php echo $cp_button; ?></td>
<td class="td_bignum"><span class="ct_sell_amount"><?php echo number_format($sell_amount); ?></span></td>
<td class="td_bignum"><span class="ct_sell_price"><?php echo number_format($sell_price); ?></span></td>
<td class="td_bignum"><?php echo number_format($point); ?></td>
</tr>
<?php
$tot_point += $point;
$tot_sell_amount += $sell_amount;
$tot_point += $point;
$tot_sell_price += $sell_price;
} // for 끝
if ($i == 0) {
@ -297,7 +297,7 @@ function get_intall_file()
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
if ($tot_sell_price < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
@ -322,23 +322,23 @@ function get_intall_file()
<!-- 주문상품 합계 시작 { -->
<dl id="sod_bsk_tot">
<dt class="sod_bsk_sell">주문</dt>
<dd class="sod_bsk_sell"><strong><?php echo number_format($tot_sell_amount); ?> 원</strong></dd>
<dd class="sod_bsk_sell"><strong><?php echo number_format($tot_sell_price); ?> 원</strong></dd>
<dt class="sod_bsk_coupon">쿠폰할인</dt>
<dd class="sod_bsk_coupon"><strong id="ct_tot_coupon">0 원</strong></dd>
<dt class="sod_bsk_dvr">배송비</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($send_cost); ?> 원</strong></dd>
<dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt">
<?php $tot_amount = $tot_sell_amount + $send_cost; // 총계 = 주문상품금액합계 + 배송비 ?>
<strong id="ct_tot_amount"><?php echo number_format($tot_amount); ?> 원</strong>
<?php $tot_price = $tot_sell_price + $send_cost; // 총계 = 주문상품금액합계 + 배송비 ?>
<strong id="ct_tot_price"><?php echo number_format($tot_price); ?> 원</strong>
</dd>
<dt class="sod_bsk_point">포인트</dt>
<dd class="sod_bsk_point"><strong><?php echo number_format($tot_point); ?> 점</strong></dd>
</dl>
<!-- } 주문상품 합계 끝 -->
<input type="hidden" name="od_amount" value="<?php echo $tot_sell_amount; ?>">
<input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>">
<input type="hidden" name="od_price" value="<?php echo $tot_sell_price; ?>">
<input type="hidden" name="org_od_price" value="<?php echo $tot_sell_price; ?>">
<input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>">
<input type="hidden" name="od_send_cost2" value="0">
<input type="hidden" name="item_coupon" value="0">
@ -368,7 +368,7 @@ function get_intall_file()
<input type="hidden" name="pay_method" value="">
<input type="hidden" name="ordr_idxx" value="<?php echo $od_id; ?>">
<input type="hidden" name="good_name" value="<?php echo $goods; ?>">
<input type="hidden" name="good_mny" value="<?php echo $tot_amount; ?>">
<input type="hidden" name="good_mny" value="<?php echo $tot_price; ?>">
<input type="hidden" name="buyr_name" value="">
<input type="hidden" name="buyr_mail" value="">
<input type="hidden" name="buyr_tel1" value="">
@ -825,7 +825,7 @@ function get_intall_file()
<?php } ?>
<tr>
<th>총 주문금액</th>
<td><span id="od_tot_amount"><?php echo number_format($tot_amount); ?></span>원</td>
<td><span id="od_tot_price"><?php echo number_format($tot_price); ?></span>원</td>
</tr>
<tr>
<th>추가배송비</th>
@ -895,8 +895,8 @@ function get_intall_file()
{
$temp_point = (int)$default['de_settle_max_point'];
if($temp_point > (int)$tot_sell_amount)
$temp_point = (int)$tot_sell_amount;
if($temp_point > (int)$tot_sell_price)
$temp_point = (int)$tot_sell_price;
if($temp_point > (int)$member['mb_point'])
$temp_point = (int)$member['mb_point'];
@ -1042,12 +1042,12 @@ $(function() {
$(".cp_apply").live("click", function() {
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='f_cp_id[]']").val();
var amount = $el.find("input[name='f_cp_amt[]']").val();
var price = $el.find("input[name='f_cp_prc[]']").val();
var subj = $el.find("input[name='f_cp_subj[]']").val();
var sell_amount;
var sell_price;
if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
if(parseInt(price) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+price+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
return false;
}
}
@ -1077,18 +1077,18 @@ $(function() {
}
}
var $s_el = $cp_row_el.find(".ct_sell_amount");;
sell_amount = parseInt($cp_row_el.find("input[name^=it_amount]").val());
sell_amount = sell_amount - parseInt(amount);
if(sell_amount < 0) {
var $s_el = $cp_row_el.find(".ct_sell_price");;
sell_price = parseInt($cp_row_el.find("input[name^=it_price]").val());
sell_price = sell_price - parseInt(price);
if(sell_price < 0) {
alert("쿠폰할인금액이 상품 주문금액보다 크므로 쿠폰을 적용할 수 없습니다.");
return false;
}
$s_el.text(number_format(String(sell_amount)));
$s_el.text(number_format(String(sell_price)));
$cp_row_el.find("input[name^=cp_id]").val(cp_id);
$cp_row_el.find("input[name^=cp_amount]").val(amount);
$cp_row_el.find("input[name^=cp_price]").val(price);
calculate_total_amount();
calculate_total_price();
$("#it_coupon_frm").remove();
$cp_btn_el.text("변경").focus();
if(!$cp_row_el.find(".it_coupon_cancel").size())
@ -1102,7 +1102,7 @@ $(function() {
$(".it_coupon_cancel").live("click", function() {
coupon_cancel($(this).closest("tr"));
calculate_total_amount();
calculate_total_price();
$("#it_coupon_frm").remove();
$(this).closest("tr").find(".it_coupon_btn").text("적용").focus();
$(this).remove();
@ -1111,10 +1111,10 @@ $(function() {
$("#od_coupon_btn").click(function() {
$("#od_coupon_frm").remove();
var $this = $(this);
var amount = parseInt($("input[name=org_od_amount]").val());
var price = parseInt($("input[name=org_od_price]").val());
$.post(
"./ordercoupon.php",
{ amount: amount },
{ price: price },
function(data) {
$this.after(data);
}
@ -1124,19 +1124,19 @@ $(function() {
$(".od_cp_apply").live("click", function() {
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='o_cp_id[]']").val();
var amount = parseInt($el.find("input[name='o_cp_amt[]']").val());
var price = parseInt($el.find("input[name='o_cp_prc[]']").val());
var subj = $el.find("input[name='o_cp_subj[]']").val();
var send_cost = $("input[name=od_send_cost]").val();
var item_coupon = parseInt($("input[name=item_coupon]").val());
var od_amount = parseInt($("input[name=org_od_amount]").val()) - item_coupon;
var od_price = parseInt($("input[name=org_od_price]").val()) - item_coupon;
if(amount == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
if(price == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+price+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
return false;
}
}
if(od_amount - amount <= 0) {
if(od_price - price <= 0) {
alert("쿠폰할인금액이 주문금액보다 크므로 쿠폰을 적용할 수 없습니다.");
return false;
}
@ -1145,10 +1145,10 @@ $(function() {
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
$("input[name=od_amount]").val(od_amount - amount);
$("input[name=od_price]").val(od_price - price);
$("input[name=od_cp_id]").val(cp_id);
$("input[name=od_coupon]").val(amount);
calculate_order_amount();
$("input[name=od_coupon]").val(price);
calculate_order_price();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰변경").focus();
if(!$("#od_coupon_cancel").size())
@ -1161,13 +1161,13 @@ $(function() {
});
$("#od_coupon_cancel").live("click", function() {
var org_amount = $("input[name=org_od_amount]").val();
var org_price = $("input[name=org_od_price]").val();
var item_coupon = parseInt($("input[name=item_coupon]").val());
$("input[name=od_amount]").val(org_amount - item_coupon);
$("input[name=od_price]").val(org_price - item_coupon);
$("input[name=sc_cp_id]").val("");
$("input[name=od_coupon]").val(0);
$("input[name=od_send_coupon]").val(0);
calculate_order_amount();
calculate_order_price();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
@ -1178,11 +1178,11 @@ $(function() {
$("#sc_coupon_btn").click(function() {
$("#sc_coupon_frm").remove();
var $this = $(this);
var amount = parseInt($("input[name=od_amount]").val());
var price = parseInt($("input[name=od_price]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val());
$.post(
"./ordersendcostcoupon.php",
{ amount: amount, send_cost: send_cost },
{ price: price, send_cost: send_cost },
function(data) {
$this.after(data);
}
@ -1192,19 +1192,19 @@ $(function() {
$(".sc_cp_apply").live("click", function() {
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='s_cp_id[]']").val();
var amount = parseInt($el.find("input[name='s_cp_amt[]']").val());
var price = parseInt($el.find("input[name='s_cp_prc[]']").val());
var subj = $el.find("input[name='s_cp_subj[]']").val();
var send_cost = parseInt($("input[name=od_send_cost]").val());
if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
if(parseInt(price) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+price+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
return false;
}
}
$("input[name=sc_cp_id]").val(cp_id);
$("input[name=od_send_coupon]").val(amount);
calculate_order_amount();
$("input[name=od_send_coupon]").val(price);
calculate_order_price();
$("#sc_coupon_frm").remove();
$("#sc_coupon_btn").text("쿠폰변경").focus();
if(!$("#sc_coupon_cancel").size())
@ -1218,7 +1218,7 @@ $(function() {
$("#sc_coupon_cancel").live("click", function() {
$("input[name=od_send_coupon]").val(0);
calculate_order_amount();
calculate_order_price();
$("#sc_coupon_frm").remove();
$("#sc_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
@ -1291,39 +1291,39 @@ $(function() {
function coupon_cancel($el)
{
var $dup_sell_el = $el.find(".ct_sell_amount");
var $dup_amount_el = $el.find("input[name^=cp_amount]");
var org_sell_amount = $el.find("input[name^=it_amount]").val();
var $dup_sell_el = $el.find(".ct_sell_price");
var $dup_price_el = $el.find("input[name^=cp_price]");
var org_sell_price = $el.find("input[name^=it_price]").val();
$dup_sell_el.text(number_format(String(org_sell_amount)));
$dup_amount_el.val(0);
$dup_sell_el.text(number_format(String(org_sell_price)));
$dup_price_el.val(0);
$el.find("input[name^=cp_id]").val("");
}
function calculate_total_amount()
function calculate_total_price()
{
var $it_amt = $("input[name^=it_amount]");
var $cp_amt = $("input[name^=cp_amount]");
var tot_sell_amount = sell_amount = tot_cp_amount = 0;
var it_amount, cp_amount, it_notax;
var $it_prc = $("input[name^=it_price]");
var $cp_prc = $("input[name^=cp_price]");
var tot_sell_price = sell_price = tot_cp_price = 0;
var it_price, cp_price, it_notax;
var tot_mny = comm_tax_mny = comm_vat_mny = comm_free_mny = tax_mny = vat_mny = 0;
var send_cost = parseInt($("input[name=od_send_cost]").val());
$it_amt.each(function(index) {
it_amount = parseInt($(this).val());
cp_amount = parseInt($cp_amt.eq(index).val());
sell_amount += it_amount;
tot_cp_amount += cp_amount;
$it_prc.each(function(index) {
it_price = parseInt($(this).val());
cp_price = parseInt($cp_prc.eq(index).val());
sell_price += it_price;
tot_cp_price += cp_price;
});
tot_sell_amount = sell_amount - tot_cp_amount + send_cost;
tot_sell_price = sell_price - tot_cp_price + send_cost;
$("#ct_tot_coupon").text(number_format(String(tot_cp_amount))+" 원");
$("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원");
$("#ct_tot_coupon").text(number_format(String(tot_cp_price))+" 원");
$("#ct_tot_price").text(number_format(String(tot_sell_price))+" 원");
$("input[name=good_mny]").val(tot_sell_amount);
$("input[name=od_amount]").val(sell_amount - tot_cp_amount);
$("input[name=item_coupon]").val(tot_cp_amount);
$("input[name=good_mny]").val(tot_sell_price);
$("input[name=od_price]").val(sell_price - tot_cp_price);
$("input[name=item_coupon]").val(tot_cp_price);
$("input[name=od_coupon]").val(0);
$("input[name=od_send_coupon]").val(0);
<?php if($oc_cnt > 0) { ?>
@ -1344,19 +1344,19 @@ function calculate_total_amount()
<?php if($temp_point > 0 && $is_member) { ?>
calculate_temp_point();
<?php } ?>
calculate_order_amount();
calculate_order_price();
}
function calculate_order_amount()
function calculate_order_price()
{
var sell_amount = parseInt($("input[name=od_amount]").val());
var sell_price = parseInt($("input[name=od_price]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val());
var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
var send_coupon = parseInt($("input[name=od_send_coupon").val());
var tot_amount = sell_amount + send_cost + send_cost2 - send_coupon;
var tot_price = sell_price + send_cost + send_cost2 - send_coupon;
$("input[name=good_mny]").val(tot_amount);
$("#od_tot_amount").text(number_format(String(tot_amount)));
$("input[name=good_mny]").val(tot_price);
$("#od_tot_price").text(number_format(String(tot_price)));
<?php if($temp_point > 0 && $is_member) { ?>
calculate_temp_point();
<?php } ?>
@ -1364,14 +1364,14 @@ function calculate_order_amount()
function calculate_temp_point()
{
var sell_amount = parseInt($("input[name=od_amount]").val());
var sell_price = parseInt($("input[name=od_price]").val());
var mb_point = parseInt(<?php echo $member['mb_point']; ?>);
var max_point = parseInt(<?php echo $default['de_settle_max_point']; ?>);
var point_unit = parseInt(<?php echo $default['de_settle_point_unit']; ?>);
var temp_point = max_point;
if(temp_point > sell_amount)
temp_point = sell_amount;
if(temp_point > sell_price)
temp_point = sell_price;
if(temp_point > mb_point)
temp_point = mb_point;
@ -1391,17 +1391,17 @@ function calculate_sendcost(code)
$("input[name=od_send_cost2]").val(data);
$("#od_send_cost2").text(number_format(String(data)));
calculate_order_amount();
calculate_order_price();
}
);
}
function calculate_tax()
{
var $it_amt = $("input[name^=it_amount]");
var $cp_amt = $("input[name^=cp_amount]");
var sell_amount = tot_cp_amount = 0;
var it_amount, cp_amount, it_notax;
var $it_prc = $("input[name^=it_price]");
var $cp_prc = $("input[name^=cp_price]");
var sell_price = tot_cp_price = 0;
var it_price, cp_price, it_notax;
var tot_mny = comm_free_mny = tax_mny = vat_mny = 0;
var send_cost = parseInt($("input[name=od_send_cost]").val());
var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
@ -1409,16 +1409,16 @@ function calculate_tax()
var send_coupon = parseInt($("input[name=od_send_coupon]").val());
var temp_point = 0;
$it_amt.each(function(index) {
it_amount = parseInt($(this).val());
cp_amount = parseInt($cp_amt.eq(index).val());
sell_amount += it_amount;
tot_cp_amount += cp_amount;
$it_prc.each(function(index) {
it_price = parseInt($(this).val());
cp_price = parseInt($cp_prc.eq(index).val());
sell_price += it_price;
tot_cp_price += cp_price;
it_notax = $("input[name^=it_notax]").eq(index).val();
if(it_notax == "1") {
comm_free_mny += (it_amount - cp_amount);
comm_free_mny += (it_price - cp_price);
} else {
tot_mny += (it_amount - cp_amount);
tot_mny += (it_price - cp_price);
}
});
@ -1511,7 +1511,7 @@ function forderform_check(f)
return false;
}
var od_amount = parseInt(f.od_amount.value);
var od_price = parseInt(f.od_price.value);
var send_cost = parseInt(f.od_send_cost.value);
var send_cost2 = parseInt(f.od_send_cost2.value);
var send_coupon = parseInt(f.od_send_coupon.value);
@ -1533,7 +1533,7 @@ function forderform_check(f)
return false;
}
if (temp_point > od_amount) {
if (temp_point > od_price) {
alert("상품 주문금액(배송비 제외) 보다 많이 포인트결제할 수 없습니다.");
f.od_temp_point.select();
return false;
@ -1559,16 +1559,16 @@ function forderform_check(f)
// pg 결제 금액에서 포인트 금액 차감
if(settle_method != "무통장") {
f.good_mny.value = od_amount + send_cost + send_cost2 - send_coupon - temp_point;
f.good_mny.value = od_price + send_cost + send_cost2 - send_coupon - temp_point;
}
}
}
var tot_amount = od_amount + send_cost + send_cost2 - send_coupon - temp_point;
var tot_price = od_price + send_cost + send_cost2 - send_coupon - temp_point;
if (document.getElementById("od_settle_iche")) {
if (document.getElementById("od_settle_iche").checked) {
if (tot_amount - temp_point < 150) {
if (tot_price - temp_point < 150) {
alert("계좌이체는 150원 이상 결제가 가능합니다.");
return false;
}
@ -1577,7 +1577,7 @@ function forderform_check(f)
if (document.getElementById("od_settle_card")) {
if (document.getElementById("od_settle_card").checked) {
if (tot_amount - temp_point < 1000) {
if (tot_price - temp_point < 1000) {
alert("신용카드는 1000원 이상 결제가 가능합니다.");
return false;
}
@ -1586,7 +1586,7 @@ function forderform_check(f)
if (document.getElementById("od_settle_hp")) {
if (document.getElementById("od_settle_hp").checked) {
if (tot_amount - temp_point < 350) {
if (tot_price - temp_point < 350) {
alert("휴대폰은 350원 이상 결제가 가능합니다.");
return false;
}

View File

@ -53,7 +53,7 @@ if ($error != "")
alert($error);
}
$i_amount = (int)$_POST['od_amount'];
$i_price = (int)$_POST['od_price'];
$i_send_cost = (int)$_POST['od_send_cost'];
$i_send_cost2 = (int)$_POST['od_send_cost2'];
$i_send_coupon = (int)$_POST['od_send_coupon'];
@ -61,24 +61,24 @@ $i_temp_point = (int)$_POST['od_temp_point'];
// 주문금액이 상이함
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_amount,
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_price,
COUNT(distinct it_id) as cart_count
from {$g4['shop_cart_table']} where od_id = '$tmp_cart_id' and ct_select = '1' ";
$row = sql_fetch($sql);
$tot_ct_amount = $row['od_amount'];
$tot_ct_price = $row['od_price'];
$cart_count = $row['cart_count'];
// 쿠폰금액계산
$tot_cp_amount = 0;
$tot_cp_price = 0;
if($is_member) {
// 상품쿠폰
$tot_it_cp_amount = $tot_od_cp_amount = 0;
$tot_it_cp_price = $tot_od_cp_price = 0;
$it_cp_cnt = count($_POST['cp_id']);
$arr_it_cp_amt = array();
$arr_it_cp_prc = array();
for($i=0; $i<$it_cp_cnt; $i++) {
$cid = $_POST['cp_id'][$i];
$it_id = $_POST['it_id'][$i];
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_amount, cp_trunc, cp_minimum, cp_maximum
$sql = " select cp_id, cp_method, cp_target, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g4['shop_coupon_table']}
where cp_id = '$cid'
and mb_id = '{$member['mb_id']}'
@ -121,9 +121,9 @@ if($is_member) {
$dc = 0;
if($cp['cp_type']) {
$dc = floor(($item_price * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
$dc = floor(($item_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_amount'];
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
@ -132,15 +132,15 @@ if($is_member) {
if($item_price < $dc)
continue;
$tot_it_cp_amount += $dc;
$arr_it_cp_amt[$it_id] = $dc;
$tot_it_cp_price += $dc;
$arr_it_cp_prc[$it_id] = $dc;
}
$tot_od_amount = $tot_ct_amount - $tot_it_cp_amount;
$tot_od_price = $tot_ct_price - $tot_it_cp_price;
// 주문쿠폰
if($_POST['od_cp_id']) {
$sql = " select cp_id, cp_type, cp_amount, cp_trunc, cp_minimum, cp_maximum
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g4['shop_coupon_table']}
where cp_id = '{$_POST['od_cp_id']}'
and mb_id = '{$member['mb_id']}'
@ -151,33 +151,33 @@ if($is_member) {
$cp = sql_fetch($sql);
$dc = 0;
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_amount)) {
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($tot_od_amount * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
$dc = floor(($tot_od_price * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_amount'];
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
$dc = $cp['cp_maximum'];
if($tot_od_amount < $dc)
if($tot_od_price < $dc)
die('Order coupon error.');
$tot_od_cp_amount = $dc;
$tot_od_amount -= $tot_od_cp_amount;
$tot_od_cp_price = $dc;
$tot_od_price -= $tot_od_cp_price;
}
}
$tot_cp_amount = $tot_it_cp_amount + $tot_od_cp_amount;
$tot_cp_price = $tot_it_cp_price + $tot_od_cp_price;
}
if ((int)($row['od_amount'] - $tot_cp_amount) !== $i_amount) {
if ((int)($row['od_price'] - $tot_cp_price) !== $i_price) {
die("Error.");
}
// 배송비가 상이함
$tot_sell_amount = $row['od_amount'];
$tot_sell_price = $row['od_price'];
// 배송비 계산
if ($default['de_send_cost_case'] == '없음') {
$send_cost = 0;
@ -188,7 +188,7 @@ if ($default['de_send_cost_case'] == '없음') {
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
if ($tot_sell_price < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
@ -214,11 +214,11 @@ if ($default['de_send_cost_case'] == '없음') {
}
}
$tot_sc_cp_amount = 0;
$tot_sc_cp_price = 0;
if($is_member && $send_cost > 0) {
// 배송쿠폰
if($_POST['sc_cp_id']) {
$sql = " select cp_id, cp_type, cp_amount, cp_trunc, cp_minimum, cp_maximum
$sql = " select cp_id, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum
from {$g4['shop_coupon_table']}
where cp_id = '{$_POST['sc_cp_id']}'
and mb_id = '{$member['mb_id']}'
@ -229,11 +229,11 @@ if($is_member && $send_cost > 0) {
$cp = sql_fetch($sql);
$dc = 0;
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_amount)) {
if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_price)) {
if($cp['cp_type']) {
$dc = floor(($send_cost * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
$dc = floor(($send_cost * ($cp['cp_price'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc'];
} else {
$dc = $cp['cp_amount'];
$dc = $cp['cp_price'];
}
if($cp['cp_maximum'] && $dc > $cp['cp_maximum'])
@ -242,23 +242,23 @@ if($is_member && $send_cost > 0) {
if($dc > $send_cost)
$dc = $send_cost;
$tot_sc_cp_amount = $dc;
$tot_sc_cp_price = $dc;
}
}
}
if ((int)($send_cost - $tot_sc_cp_amount) !== (int)($i_send_cost - $i_send_coupon)) {
if ((int)($send_cost - $tot_sc_cp_price) !== (int)($i_send_cost - $i_send_coupon)) {
die("Error..");
}
// 추가배송비가 상이함
$zipcode = $od_b_zip1 . $od_b_zip2;
$sql = " select sc_id, sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$sql = " select sc_id, sc_price from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$tmp = sql_fetch($sql);
if(!$tmp['sc_id'])
$send_cost2 = 0;
else
$send_cost2 = (int)$tmp['sc_amount'];
$send_cost2 = (int)$tmp['sc_price'];
if($send_cost2 !== $i_send_cost2)
die("Error...");
@ -270,8 +270,8 @@ if ($is_member && $config['cf_use_point'])
if($member['mb_point'] >= $default['de_settle_min_point']) {
$temp_point = (int)$default['de_settle_max_point'];
if($temp_point > (int)$tot_od_amount)
$temp_point = (int)$tot_od_amount;
if($temp_point > (int)$tot_od_price)
$temp_point = (int)$tot_od_price;
if($temp_point > (int)$member['mb_point'])
$temp_point = (int)$member['mb_point'];
@ -290,12 +290,13 @@ if ($od_temp_point)
alert('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.');
}
$i_amount = $i_amount + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
if ($od_settle_case == "무통장")
{
$od_receipt_point = $i_temp_point;
$od_receipt_amount = 0;
$od_receipt_price = 0;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_ORDER;
}
else if ($od_settle_case == "계좌이체")
@ -303,14 +304,15 @@ else if ($od_settle_case == "계좌이체")
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$od_tno = $tno;
$od_receipt_amount = $amount;
$od_receipt_price = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_bank_account = $od_settle_case;
$od_deposit_name = $od_name;
$bank_name = iconv("cp949", "utf8", $bank_name);
$od_bank_account = $bank_name;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_SETTLE;
}
else if ($od_settle_case == "가상계좌")
@ -319,12 +321,13 @@ else if ($od_settle_case == "가상계좌")
$od_receipt_point = $i_temp_point;
$od_tno = $tno;
$od_receipt_amount = 0;
$od_receipt_price = 0;
$bankname = iconv("cp949", "utf8", $bankname);
$depositor = iconv("cp949", "utf8", $depositor);
$od_bank_account = $bankname.' '.$account.' '.$depositor;
$od_deposit_name = $depositor;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_ORDER;
}
else if ($od_settle_case == "휴대폰")
@ -332,11 +335,12 @@ else if ($od_settle_case == "휴대폰")
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$od_tno = $tno;
$od_receipt_amount = $amount;
$od_receipt_price = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$od_bank_account = $commid.' '.$mobile_no;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_SETTLE;
}
else if ($od_settle_case == "신용카드")
@ -345,12 +349,13 @@ else if ($od_settle_case == "신용카드")
$od_tno = $tno;
$od_app_no = $app_no;
$od_receipt_amount = $amount;
$od_receipt_price = $amount;
$od_receipt_point = $i_temp_point;
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$card_name = iconv("cp949", "utf8", $card_name);
$od_bank_account = $card_name;
$pg_amount = $amount;
$pg_price = $amount;
$od_misu = $i_price - $od_receipt_price;
$od_status = G4_OD_STATUS_SETTLE;
}
else
@ -360,7 +365,7 @@ else
// 주문금액과 결제금액이 일치하는지 체크
if($tno) {
if((int)$i_amount !== (int)$pg_amount) {
if((int)$i_price !== (int)$pg_price) {
$cancel_msg = '결제금액 불일치';
include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
@ -381,8 +386,8 @@ if($escw_yn == 'Y')
$od_escrow = 1;
// 복합과세 금액
$od_tax_mny = round($i_amount / 1.1);
$od_vat_mny = $i_amount - $od_tax_mny;
$od_tax_mny = round($i_price / 1.1);
$od_vat_mny = $i_price - $od_tax_mny;
$od_free_mny = 0;
if($default['de_tax_flag_use']) {
$od_tax_mny = (int)$_POST['comm_tax_mny'];
@ -413,16 +418,17 @@ $sql = " insert {$g4['shop_order_table']}
od_deposit_name = '$od_deposit_name',
od_memo = '$od_memo',
od_cart_count = '$cart_count',
od_cart_amount = '$tot_ct_amount',
od_cart_coupon = '$tot_it_cp_amount',
od_cart_price = '$tot_ct_price',
od_cart_coupon = '$tot_it_cp_price',
od_send_cost = '$od_send_cost',
od_send_coupon = '$tot_sc_cp_amount',
od_send_coupon = '$tot_sc_cp_price',
od_send_cost2 = '$od_send_cost2',
od_coupon = '$tot_od_cp_amount',
od_receipt_amount = '$od_receipt_amount',
od_coupon = '$tot_od_cp_price',
od_receipt_price = '$od_receipt_price',
od_receipt_point = '$od_receipt_point',
od_bank_account = '$od_bank_account',
od_receipt_time = '$od_receipt_time',
od_misu = '$od_misu',
od_tno = '$od_tno',
od_app_no = '$od_app_no',
od_escrow = '$od_escrow',
@ -456,7 +462,7 @@ if(!$result) {
// 장바구니 쇼핑에서 주문으로
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
$sql_card_point = "";
if ($od_receipt_amount > 0 && !$default['de_card_point']) {
if ($od_receipt_price > 0 && !$default['de_card_point']) {
$sql_card_point = " , ct_point = '0' ";
}
$sql = "update {$g4['shop_cart_table']}
@ -507,9 +513,9 @@ if($is_member) {
sql_query($sql);
// 쿠폰사용금액 cart에 기록
$cp_amt = (int)$arr_it_cp_amt[$cp_it_id];
$cp_prc = (int)$arr_it_cp_prc[$cp_it_id];
$sql = " update {$g4['shop_cart_table']}
set cp_amount = '$cp_amt'
set cp_price = '$cp_prc'
where od_id = '$od_id'
and it_id = '$cp_it_id'
and ct_select = '1'
@ -567,7 +573,7 @@ if($default['de_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3']
$sms_content = preg_replace("/{보낸분}/", $od_name, $sms_content);
$sms_content = preg_replace("/{받는분}/", $od_b_name, $sms_content);
$sms_content = preg_replace("/{주문번호}/", $od_id, $sms_content);
$sms_content = preg_replace("/{주문금액}/", number_format($ttotal_amount), $sms_content);
$sms_content = preg_replace("/{주문금액}/", number_format($tot_ct_price), $sms_content);
$sms_content = preg_replace("/{회원아이디}/", $member['mb_id'], $sms_content);
$sms_content = preg_replace("/{회사명}/", $default['de_admin_company_name'], $sms_content);

View File

@ -21,13 +21,12 @@ if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
</thead>
<tbody>
<?php
$sql = " select a.od_id,
a.*, "._MISU_QUERY_."
from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (a.od_id=b.od_id)
where a.mb_id = '{$member['mb_id']}'
group by a.od_id
order by a.od_id desc
$sql = " select *,
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
from {$g4['shop_order_table']}
where mb_id = '{$member['mb_id']}'
group by od_id
order by od_id desc
$limit ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
@ -41,11 +40,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<a href="<?php echo G4_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&amp;uid=<?php echo $uid; ?>"><?php echo $row['od_id']; ?></a>
</td>
<td><?php echo substr($row['od_time'],0,16); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
<td class="td_num"><?php echo $row['itemcount']; ?></td>
<td class="td_bignum"><?php echo display_price($row['orderamount']); ?></td>
<td class="td_bignum"><?php echo display_price($row['couponamount']); ?></td>
<td class="td_bignum"><?php echo display_price($row['receiptamount']); ?></td>
<td class="td_bignum"><?php echo display_price($row['misu']); ?></td>
<td class="td_num"><?php echo $row['od_cart_count']; ?></td>
<td class="td_bignum"><?php echo display_price($row['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2']); ?></td>
<td class="td_bignum"><?php echo display_price($row['couponprice']); ?></td>
<td class="td_bignum"><?php echo display_price($row['od_receipt_price']); ?></td>
<td class="td_bignum"><?php echo display_price($row['od_misu']); ?></td>
</tr>
<?php

View File

@ -24,7 +24,7 @@ $ct = sql_fetch($sql);
$uid = md5($od['od_id'].$od['od_time'].$od['od_ip']);
if($ct['od_count1'] != $ct['od_count2'] || ($od['od_settle_case'] == '가상계좌' && $od['od_receipt_amount'] > 0)) {
if($od['od_status'] != G4_OD_STATUS_ORDER && $od['od_status'] != G4_OD_STATUS_SETTLE) {
alert("취소할 수 있는 주문이 아닙니다.", G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&amp;uid=$uid");
}
@ -64,7 +64,9 @@ sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where od_id
// 주문 취소
$cancel_memo = addslashes($cancel_memo);
sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_receipt_amount = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where od_id = '$od_id' ");
$cancel_price = $od['od_misu'];
sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_receipt_price = '0', od_receipt_point = '0', od_misu = '0', od_cancel_price = '$cancel_price', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where od_id = '$od_id' ");
// 주문취소 회원의 포인트를 되돌려 줌
if ($od['od_receipt_point'] > 0)

View File

@ -84,7 +84,7 @@ if(openwin != null) {
</thead>
<tbody>
<?php
$sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, cp_amount, io_type, io_price
$sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, io_type, io_price
from {$g4['shop_cart_table']}
where od_id = '$od_id'
and it_id = '{$row['it_id']}'
@ -98,7 +98,7 @@ if(openwin != null) {
else
$opt_price = $opt['ct_price'] + $opt['io_price'];
$sell_amount = $opt_price * $opt['ct_qty'];
$sell_price = $opt_price * $opt['ct_qty'];
$point = $opt['ct_point'] * $opt['ct_qty'];
$ct_list[$opt['ct_id']]['name'] = $opt['it_name'];
@ -108,7 +108,7 @@ if(openwin != null) {
<td><?php echo $opt['ct_option']; ?></td>
<td class="td_smallmng"><?php echo number_format($opt['ct_qty']); ?></td>
<td class="td_bignum"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($sell_amount); ?></td>
<td class="td_num"><?php echo number_format($sell_price); ?></td>
<td class="td_num"><?php echo number_format($point); ?></td>
<td class="td_smallmng"><?php echo $opt['ct_status']; ?></td>
</tr>
@ -126,12 +126,12 @@ if(openwin != null) {
<?php
// 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 - 배송비할인
$tot_amount = $od['od_cart_amount'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon'];
$tot_price = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon'];
?>
<dl id="sod_bsk_tot">
<dt class="sod_bsk_dvr">주문총액</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_cart_amount']); ?> 원</strong></dd>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_cart_price']); ?> 원</strong></dd>
<?php if($od['od_cart_coupon'] > 0) { ?>
<dt class="sod_bsk_dvr">상품할인</dt>
@ -159,7 +159,7 @@ if(openwin != null) {
<?php } ?>
<dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원</strong></dd>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원</strong></dd>
<dt class="sod_bsk_point">포인트</dt>
<dd class="sod_bsk_point"><strong><?php echo number_format($tot_point); ?> 점</strong></dd>
@ -169,28 +169,28 @@ if(openwin != null) {
<div id="sod_fin_view">
<h2>결제/배송 정보</h2>
<?php
$receipt_amount = $od['od_receipt_amount']
+ $od['od_receipt_point']
- $od['od_cancel_amount'];
$receipt_price = $od['od_receipt_price']
+ $od['od_receipt_point'];
$cancel_price = $od['od_cancel_price'];
$misu = true;
if ($tot_amount - $tot_cancel_amount == $receipt_amount) {
if ($tot_price - $cancel_price == $receipt_price) {
$wanbul = " (완불)";
$misu = false; // 미수금 없음
}
else
{
$wanbul = display_price($receipt_amount);
$wanbul = display_price($receipt_price);
}
$misu_amount = $tot_amount - $receipt_amount - $od['od_dc_amount'];
$misu_price = $tot_price - $receipt_price - $cancel_price;
// 결제정보처리
if($od['od_receipt_amount'] > 0)
$od_receipt_amount = display_price($od['od_receipt_amount']);
if($od['od_receipt_price'] > 0)
$od_receipt_price = display_price($od['od_receipt_price']);
else
$od_receipt_amount = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$od_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$app_no_subj = '';
$disp_bank = true;
@ -234,10 +234,10 @@ if(openwin != null) {
</tr>
<tr>
<th scope="row">결제금액</th>
<td><?php echo $od_receipt_amount; ?></td>
<td><?php echo $od_receipt_price; ?></td>
</tr>
<?php
if($od['od_receipt_amount'] > 0)
if($od['od_receipt_price'] > 0)
{
?>
<tr>
@ -310,12 +310,12 @@ if(openwin != null) {
<?php
}
if ($od['od_cancel_amount'] > 0)
if ($od['od_cancel_price'] > 0)
{
?>
<tr>
<th scope="row">취소/환불 금액</th>
<td><?php echo display_price($od['od_cancel_amount']); ?></td>
<td><?php echo display_price($od['od_cancel_price']); ?></td>
</tr>
<?php
}
@ -323,7 +323,7 @@ if(openwin != null) {
// 현금영수증 발급을 사용하는 경우에만
if ($default['de_taxsave_use'] && $default['de_card_pg'] == 'kcp') {
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
if ($misu_amount == 0 && $od['od_receipt_amount'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
if ($misu_price == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
?>
<tr>
<th scope="row">현금영수증</th>
@ -486,19 +486,13 @@ if(openwin != null) {
<ul>
<li>
총 구매액
<strong><?php echo display_price($tot_amount); ?></strong>
<strong><?php echo display_price($tot_price); ?></strong>
</li>
<?php
if ($od['od_dc_amount'] > 0) {
echo '<li>';
echo '할인액'.PHP_EOL;
echo '<strong>'.display_price($od['od_dc_amount']).'</strong>';
echo '</li>';
}
if ($misu_amount > 0) {
if ($misu_price > 0) {
echo '<li>';
echo '미결제액'.PHP_EOL;
echo '<strong>'.display_price($misu_amount).'</strong>';
echo '<strong>'.display_price($misu_price).'</strong>';
echo '</li>';
}
?>
@ -513,8 +507,8 @@ if(openwin != null) {
<h2>주문취소</h2>
<?php
// 취소한 내역이 없다면
if ($tot_cancel_amount == 0) {
if (!$rq_cnt && $od_count1 == $od_count2 && ($od['od_settle_case'] != '가상계좌' || $od['od_receipt_amount'] == 0)) {
if ($cancel_price == 0) {
if ($od['od_status'] == G4_OD_STATUS_ORDER || $od['od_status'] == G4_OD_STATUS_SETTLE) {
?>
<button type="button" onclick="document.getElementById('sod_fin_cancelfrm').style.display='block';">주문 취소하기</button>
@ -532,7 +526,6 @@ if(openwin != null) {
<?php
}
} else {
$misu_amount = $misu_amount - $send_cost;
?>
<p>주문 취소, 반품, 품절된 내역이 있습니다.</p>
<?php } ?>

View File

@ -57,9 +57,9 @@ $count = mysql_num_rows($result);
for($i=0; $row=sql_fetch_array($result); $i++) {
$dc = 0;
if($row['cp_type']) {
$dc = floor(($item_price * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
$dc = floor(($item_price * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
} else {
$dc = $row['cp_amount'];
$dc = $row['cp_price'];
}
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
@ -68,7 +68,7 @@ $count = mysql_num_rows($result);
<tr>
<td>
<input type="hidden" name="f_cp_id[]" value="<?php echo $row['cp_id']; ?>">
<input type="hidden" name="f_cp_amt[]" value="<?php echo $dc; ?>">
<input type="hidden" name="f_cp_prc[]" value="<?php echo $dc; ?>">
<input type="hidden" name="f_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
<?php echo get_text($row['cp_subject']); ?>
</td>

View File

@ -3,7 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
unset($list);
$ttotal_amount = 0;
$ttotal_price = 0;
$ttotal_point = 0;
//==============================================================================
@ -61,19 +61,19 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$list[$i]['it_origin'] = $row['it_origin'];
$list[$i]['it_opt'] = $options;
$list[$i]['ct_price'] = $row['ct_price'];
$list[$i]['stotal_amount'] = $sum['price'];
$list[$i]['stotal_price'] = $sum['price'];
$list[$i]['stotal_point'] = $sum['point'];
$ttotal_amount += $list[$i]['stotal_amount'];
$ttotal_price += $list[$i]['stotal_price'];
$ttotal_point += $list[$i]['stotal_point'];
}
//------------------------------------------------------------------------------
// 배송비가 있다면 총계에 더한다
if ($od_send_cost)
$ttotal_amount += $od_send_cost;
$ttotal_price += $od_send_cost;
// 추가배송비가 있다면 총계에 더한다
if ($od_send_cost2)
$ttotal_amount += $od_send_cost2;
$ttotal_price += $od_send_cost2;
?>

View File

@ -6,7 +6,7 @@ $code = $_POST['zipcode'];
if(!$code)
die('0');
$sql = " select sc_id, sc_amount
$sql = " select sc_id, sc_price
from {$g4['shop_sendcost_table']}
where sc_zip1 <= $code
and sc_zip2 >= $code ";
@ -15,5 +15,5 @@ $row = sql_fetch($sql);
if(!$row['sc_id'])
die('0');
die($row['sc_amount']);
die($row['sc_price']);
?>

View File

@ -4,7 +4,7 @@ include_once('./_common.php');
if($is_guest)
exit;
$amount = $_POST['amount'];
$price = $_POST['price'];
$send_cost = $_POST['send_cost'];
// 쿠폰정보
@ -15,7 +15,7 @@ $sql = " select *
and cp_start <= '".G4_TIME_YMD."'
and cp_end >= '".G4_TIME_YMD."'
and cp_used = '0'
and cp_minimum <= '$amount' ";
and cp_minimum <= '$price' ";
$result = sql_query($sql);
$count = mysql_num_rows($result);
?>
@ -37,9 +37,9 @@ $count = mysql_num_rows($result);
for($i=0; $row=sql_fetch_array($result); $i++) {
$dc = 0;
if($row['cp_type']) {
$dc = floor(($send_cost * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
$dc = floor(($send_cost * ($row['cp_price'] / 100)) / $row['cp_trunc']) * $row['cp_trunc'];
} else {
$dc = $row['cp_amount'];
$dc = $row['cp_price'];
}
if($row['cp_maximum'] && $dc > $row['cp_maximum'])
@ -51,7 +51,7 @@ $count = mysql_num_rows($result);
<tr>
<td>
<input type="hidden" name="s_cp_id[]" value="<?php echo $row['cp_id']; ?>">
<input type="hidden" name="s_cp_amt[]" value="<?php echo $dc; ?>">
<input type="hidden" name="s_cp_prc[]" value="<?php echo $dc; ?>">
<input type="hidden" name="s_cp_subj[]" value="<?php echo $row['cp_subject']; ?>">
<?php echo get_text($row['cp_subject']); ?>
</td>

View File

@ -6,7 +6,7 @@ if (G4_IS_MOBILE) {
return;
}
$sql = " select * from {$g4['shop_personalpay_table']} where pp_id = '$pp_id' and pp_use = '1' and pp_amount > 0 ";
$sql = " select * from {$g4['shop_personalpay_table']} where pp_id = '$pp_id' and pp_use = '1' and pp_price > 0 ";
$pp = sql_fetch($sql);
if(!$pp['pp_id'])
@ -24,7 +24,7 @@ if (file_exists('./settle_'.$default['de_card_pg'].'.inc.php')) {
}
// 개인결제 체크를 위한 hash
$hash_data = md5($pp['pp_id'].$pp['pp_amount'].$pp['pp_time']);
$hash_data = md5($pp['pp_id'].$pp['pp_price'].$pp['pp_time']);
set_session('ss_personalpay_id', $pp['pp_id']);
set_session('ss_personalpay_hash', $hash_data);
?>
@ -143,7 +143,7 @@ function get_intall_file()
<input type="hidden" name="pay_method" value="">
<input type="hidden" name="ordr_idxx" value="<?php echo $pp['pp_id']; ?>">
<input type="hidden" name="good_name" value="<?php echo $pp['pp_name'].'님 개인결제'; ?>">
<input type="hidden" name="good_mny" value="<?php echo $pp['pp_amount']; ?>">
<input type="hidden" name="good_mny" value="<?php echo $pp['pp_price']; ?>">
<input type="hidden" name="buyr_name" value="">
<input type="hidden" name="buyr_mail" value="">
<input type="hidden" name="buyr_tel1" value="">
@ -181,7 +181,7 @@ function get_intall_file()
$good_info .= "ordr_numb={$pp_id}_".sprintf("%04d", 1).chr(31);
$good_info .= "good_name=".addslashes($pp['pp_name'].'님 개인결제').chr(31);
$good_info .= "good_cntx=1".chr(31);
$good_info .= "good_amtx=".$pp['pp_amount'].chr(31);
$good_info .= "good_amtx=".$pp['pp_price'].chr(31);
}
?>
<!-- PLUGIN 설정 정보입니다(변경 불가) -->
@ -353,7 +353,7 @@ function get_intall_file()
<tbody>
<tr>
<th>결제금액</th>
<td><?php echo display_price($pp['pp_amount']); ?></td>
<td><?php echo display_price($pp['pp_price']); ?></td>
</tr>
<tr>
<th scope="row"><label for="pp_name">이름</label></th>
@ -510,11 +510,11 @@ function fpersonalpayform_check(f)
return false;
}
var tot_amount = <?php echo (int)$pp['pp_amount']; ?>;
var tot_price = <?php echo (int)$pp['pp_price']; ?>;
if (document.getElementById("pp_settle_iche")) {
if (document.getElementById("pp_settle_iche").checked) {
if (tot_amount < 150) {
if (tot_price < 150) {
alert("계좌이체는 150원 이상 결제가 가능합니다.");
return false;
}
@ -523,7 +523,7 @@ function fpersonalpayform_check(f)
if (document.getElementById("pp_settle_card")) {
if (document.getElementById("pp_settle_card").checked) {
if (tot_amount < 1000) {
if (tot_price < 1000) {
alert("신용카드는 1000원 이상 결제가 가능합니다.");
return false;
}
@ -532,7 +532,7 @@ function fpersonalpayform_check(f)
if (document.getElementById("pp_settle_hp")) {
if (document.getElementById("pp_settle_hp").checked) {
if (tot_amount < 350) {
if (tot_price < 350) {
alert("휴대폰은 350원 이상 결제가 가능합니다.");
return false;
}

View File

@ -16,7 +16,7 @@ $pp = sql_fetch($sql);
if(!$pp['pp_id'])
alert('개인결제 정보가 존재하지 않습니다.');
if($pp['pp_receipt_amount'] > 0)
if($pp['pp_tno'])
alert('이미 결제하신 개인결제 내역입니다.');
$hash_data = md5($_POST['pp_id'].$_POST['good_mny'].$pp['pp_time']);
@ -29,45 +29,45 @@ if ($pp_settle_case == "계좌이체")
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = $amount;
$pp_receipt_price = $amount;
$pp_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$pp_deposit_name = $pp_name;
$bank_name = iconv("cp949", "utf8", $bank_name);
$pp_bank_account = $bank_name;
$pg_amount = $amount;
$pg_price = $amount;
}
else if ($pp_settle_case == "가상계좌")
{
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = 0;
$pp_receipt_price = 0;
$bankname = iconv("cp949", "utf8", $bankname);
$depositor = iconv("cp949", "utf8", $depositor);
$pp_bank_account = $bankname.' '.$account.' '.$depositor;
$pp_deposit_name = $depositor;
$pg_amount = $amount;
$pg_price = $amount;
}
else if ($pp_settle_case == "휴대폰")
{
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = $amount;
$pp_receipt_price = $amount;
$pp_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$pp_bank_account = $commid.' '.$mobile_no;
$pg_amount = $amount;
$pg_price = $amount;
}
else if ($pp_settle_case == "신용카드")
{
include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
$pp_tno = $tno;
$pp_receipt_amount = $amount;
$pp_receipt_price = $amount;
$pp_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
$card_name = iconv("cp949", "utf8", $card_name);
$pp_bank_account = $card_name;
$pg_amount = $amount;
$pg_price = $amount;
}
else
{
@ -75,7 +75,7 @@ else
}
// 주문금액과 결제금액이 일치하는지 체크
if((int)$pp['pp_amount'] !== (int)$pg_amount) {
if((int)$pp['pp_price'] !== (int)$pg_price) {
$cancel_msg = '결제금액 불일치';
include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
@ -86,7 +86,7 @@ if((int)$pp['pp_amount'] !== (int)$pg_amount) {
$sql = " update {$g4['shop_personalpay_table']}
set pp_tno = '$pp_tno',
pp_app_no = '$app_no',
pp_receipt_amount = '$pp_receipt_amount',
pp_receipt_price = '$pp_receipt_price',
pp_settle_case = '$pp_settle_case',
pp_bank_account = '$pp_bank_account',
pp_deposit_name = '$pp_deposit_name',
@ -106,13 +106,13 @@ if(!$result) {
}
// 주문번호가 있으면 결제정보 반영
if($pp_receipt_amount > 0 && $pp['pp_id'] && $pp['od_id']) {
if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
$od_escrow = 0;
if($escw_yn == 'Y')
$od_escrow = 1;
$sql = " update {$g4['shop_order_table']}
set od_receipt_amount = od_receipt_amount + '$pp_receipt_amount',
set od_receipt_price = od_receipt_price + '$pp_receipt_price',
od_receipt_time = '$pp_receipt_time',
od_tno = '$pp_tno',
od_app_no = '$app_no',

View File

@ -36,22 +36,22 @@ if(openwin != null) {
<?php
$misu = true;
if ($pp['pp_amount'] == $pp['pp_receipt_amount']) {
if ($pp['pp_price'] == $pp['pp_receipt_price']) {
$wanbul = " (완불)";
$misu = false; // 미수금 없음
}
else
{
$wanbul = display_price($pp['pp_receipt_amount']);
$wanbul = display_price($pp['pp_receipt_price']);
}
$misu_amount = $pp['pp_amount'] - $pp['pp_receipt_amount'];
$misu_price = $pp['pp_price'] - $pp['pp_receipt_price'];
// 결제정보처리
if($pp['pp_receipt_amount'] > 0)
$pp_receipt_amount = display_price($pp['pp_receipt_amount']);
if($pp['pp_receipt_price'] > 0)
$pp_receipt_price = display_price($pp['pp_receipt_price']);
else
$pp_receipt_amount = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$pp_receipt_price = '아직 입금되지 않았거나 입금정보를 입력하지 못하였습니다.';
$app_no_subj = '';
$disp_bank = true;
@ -91,14 +91,14 @@ if(openwin != null) {
<th scope="row">결제방식</th>
<td><?php echo $pp['pp_settle_case']; ?></td>
</tr>
<?php if($pp_receipt_amount > 0) { ?>
<?php if($pp_receipt_price) { ?>
<tr>
<th scope="row">결제금액</th>
<td><?php echo $pp_receipt_amount; ?></td>
<td><?php echo $pp_receipt_price; ?></td>
</tr>
<tr>
<th scope="row">결제일시</th>
<td><?php echo $pp['pp_receipt_time']; ?></td>
<td><?php echo is_null_time($pp['pp_receipt_time']) ? $pp['pp_receipt_time'] : ''; ?></td>
</tr>
<?php
}
@ -166,13 +166,13 @@ if(openwin != null) {
<ul>
<li>
총 주문액
<strong><?php echo display_price($pp['pp_amount']); ?></strong>
<strong><?php echo display_price($pp['pp_price']); ?></strong>
</li>
<?php
if ($misu_amount > 0) {
if ($misu_price > 0) {
echo '<li>';
echo '미결제액'.PHP_EOL;
echo '<strong>'.display_price($misu_amount).'</strong>';
echo '<strong>'.display_price($misu_price).'</strong>';
echo '</li>';
}
?>

View File

@ -147,7 +147,7 @@ if(!$default['de_card_test']) {
if($row['pp_id']) {
// 개인결제 UPDATE
$sql = " update {$g4['shop_personalpay_table']}
set pp_receipt_amount = '$ipgm_mnyx',
set pp_receipt_price = '$ipgm_mnyx',
pp_receipt_time = '$tx_tm'
where pp_id = '$order_no'
and pp_tno = '$tno' ";
@ -157,7 +157,7 @@ if(!$default['de_card_test']) {
// 주문서 UPDATE
$receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $tx_tm);
$sql = " update {$g4['shop_order_table']}
set od_receipt_amount = od_receipt_amount + '$ipgm_mnyx',
set od_receipt_price = od_receipt_price + '$ipgm_mnyx',
od_receipt_time = '$tx_tm',
od_status = '".G4_OD_STATUS_SETTLE."',
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$row['pp_id']." 로 결제완료 - ".$receipt_time."\")
@ -167,7 +167,7 @@ if(!$default['de_card_test']) {
} else {
// 주문서 UPDATE
$sql = " update {$g4['shop_order_table']}
set od_receipt_amount = '$ipgm_mnyx',
set od_receipt_price = '$ipgm_mnyx',
od_receipt_time = '$tx_tm',
od_status = '".G4_OD_STATUS_SETTLE."'
where od_id = '$order_no'

View File

@ -14,7 +14,7 @@ $goods_name = $goods['full_name'];
$trad_time = date("YmdHis");
$amt_tot = (int)$od['od_receipt_amount'];
$amt_tot = (int)$od['od_receipt_price'];
$amt_sup = (int)round(($amt_tot * 10) / 11);
$amt_svc = 0;
$amt_tax = (int)($amt_tot - $amt_sup);

View File

@ -24,7 +24,7 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
<a href="<?php echo $href; ?>" class="sct_a">
<span class="sct_img"><img src="<?php echo G4_SHOP_SKIN_URL; ?>/img/personal.jpg" alt=""></span>
<b><?php echo get_text($row['pp_name']).'님 개인결제'; ?></b>
<span class="sct_cost"><?php echo display_price($row['pp_amount']); ?></span>
<span class="sct_cost"><?php echo display_price($row['pp_price']); ?></span>
</a>
</li>
<?php