Merge branch 'master' of github.com:gnuboard/yc5
This commit is contained in:
@ -18,6 +18,14 @@ if($od['od_receipt_price'] - $od['od_refund_price'] <= 0)
|
||||
|
||||
$g5['title'] = $od['od_settle_case'].' 부분취소';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
// 과세, 비과세 취소가능 금액계산
|
||||
$sql = " select SUM( IF( ct_notax = 0, ( IF(io_type = 1, (io_price * ct_qty), ( (ct_price + io_price) * ct_qty) ) - cp_price ), 0 ) ) as tax_mny,
|
||||
SUM( IF( ct_notax = 1, ( IF(io_type = 1, (io_price * ct_qty), ( (ct_price + io_price) * ct_qty) ) - cp_price ), 0 ) ) as free_mny
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where od_id = '$od_id'
|
||||
and ct_status IN ( '취소', '반품', '품절' ) ";
|
||||
$sum = sql_fetch($sql);
|
||||
?>
|
||||
|
||||
<form name="forderpartcancel" method="post" action="./orderpartcancelupdate.php" onsubmit="return form_check(this);">
|
||||
@ -35,12 +43,12 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">과세 입금금액</th>
|
||||
<td><?php echo display_price($od['od_tax_mny'] + $od['od_vat_mny']); ?></td>
|
||||
<th scope="row">과세 취소가능 금액</th>
|
||||
<td><?php echo display_price($sum['tax_mny']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">비과세 입금금액</th>
|
||||
<td><?php echo display_price($od['od_free_mny']); ?></td>
|
||||
<th scope="row">비과세 취소가능 금액</th>
|
||||
<td><?php echo display_price($sum['free_mny']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mod_tax_mny">과세 취소금액</label></th>
|
||||
@ -68,8 +76,8 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
<script>
|
||||
function form_check(f)
|
||||
{
|
||||
var max_tax_mny = parseInt(<?php echo ($od['od_tax_mny'] + $od['od_vat_mny']); ?>);
|
||||
var max_free_mny = parseInt(<?php echo $od['od_free_mny']; ?>);
|
||||
var max_tax_mny = parseInt(<?php echo $sum['tax_mny']; ?>);
|
||||
var max_free_mny = parseInt(<?php echo $sum['free_mny']; ?>);
|
||||
var tax_mny = parseInt(f.mod_tax_mny.value.replace("/[^0-9]/g", ""));
|
||||
var free_mny = parseInt(f.mod_free_mny.value.replace("/[^0-9]/g", ""));
|
||||
|
||||
|
||||
@ -24,11 +24,19 @@ if($od['od_settle_case'] == '계좌이체' && substr($od['od_receipt_time'], 0,
|
||||
alert_close('실시간 계좌이체건의 부분취소 요청은 결제일 익일에 가능합니다.');
|
||||
|
||||
// 금액비교
|
||||
if($tax_mny && $tax_mny > ($od['od_tax_mny'] + $od['od_vat_mny']))
|
||||
alert('과세 취소금액을 '.number_format(($od['od_tax_mny'] + $od['od_vat_mny'])).'원 이하로 입력해 주십시오.');
|
||||
// 과세, 비과세 취소가능 금액계산
|
||||
$sql = " select SUM( IF( ct_notax = 0, ( IF(io_type = 1, (io_price * ct_qty), ( (ct_price + io_price) * ct_qty) ) - cp_price ), 0 ) ) as tax_mny,
|
||||
SUM( IF( ct_notax = 1, ( IF(io_type = 1, (io_price * ct_qty), ( (ct_price + io_price) * ct_qty) ) - cp_price ), 0 ) ) as free_mny
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where od_id = '$od_id'
|
||||
and ct_status IN ( '취소', '반품', '품절' ) ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
if($free_mny && $free_mny > $od['od_free_mny'])
|
||||
alert('비과세 취소금액을 '.number_format($od['od_free_mny']).'원 이하로 입력해 주십시오.');
|
||||
if($tax_mny && $tax_mny > $sum['tax_mny'])
|
||||
alert('과세 취소금액을 '.number_format($sum['tax_mny']).'원 이하로 입력해 주십시오.');
|
||||
|
||||
if($free_mny && $free_mny > $sum['free_mny'])
|
||||
alert('비과세 취소금액을 '.number_format($sum['free_mny']).'원 이하로 입력해 주십시오.');
|
||||
|
||||
// 취소사유의 한글깨짐 방지처리
|
||||
$def_locale = setlocale(LC_CTYPE, 0);
|
||||
@ -160,52 +168,24 @@ if ( $req_tx == "mod" )
|
||||
$mod_mny = $c_PayPlus->mf_get_res_data( "panc_mod_mny" ); // 취소요청된 금액
|
||||
$rem_mny = $c_PayPlus->mf_get_res_data( "panc_rem_mny" ); // 취소요청후 잔액
|
||||
|
||||
// 주문 합계
|
||||
$sql = " select SUM( IF( ct_notax = 0, ( IF(io_type = 1, (io_price * ct_qty), ( (ct_price + io_price) * ct_qty) ) - cp_price ), 0 ) ) as tax_mny,
|
||||
SUM( IF( ct_notax = 1, ( IF(io_type = 1, (io_price * ct_qty), ( (ct_price + io_price) * ct_qty) ) - cp_price ), 0 ) ) as free_mny
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where od_id = '{$od['od_id']}'
|
||||
and ct_status IN ( '주문', '준비', '배송', '완료' ) ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
$tax_mny = $sum['tax_mny'];
|
||||
$free_mny = $sum['free_mny'];
|
||||
|
||||
// 과세, 비과세
|
||||
if($od['od_tax_flag']) {
|
||||
$tot_tax_mny = ( $tax_mny + $od['od_send_cost'] + $od['od_send_cost2'] )
|
||||
- ( $od['od_coupon'] + $od['od_send_coupon'] + $od['od_receipt_point'] );
|
||||
if($tot_tax_mny < 0) {
|
||||
$tot_tax_mny = 0;
|
||||
$free_mny += $tot_tax_mny;
|
||||
}
|
||||
} else {
|
||||
$tot_tax_mny = ( $tax_mny + $free_mny + $od['od_send_cost'] + $od['od_send_cost2'] )
|
||||
- ( $od['od_coupon'] + $od['od_send_coupon'] + $od['od_receipt_point'] );
|
||||
$free_mny = 0;
|
||||
}
|
||||
|
||||
$od_tax_mny = round($tot_tax_mny / 1.1);
|
||||
$od_vat_mny = $tot_tax_mny - $od_tax_mny;
|
||||
$od_free_mny = $free_mny;
|
||||
|
||||
// 미수
|
||||
$od_misu = ( $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2'] )
|
||||
- ( $od['od_cart_coupon'] + $od['od_coupon'] + $od['od_send_coupon'] )
|
||||
- ( $od['od_receipt_price'] + $od['od_receipt_point'] - $mod_mny );
|
||||
|
||||
$shop_memo = '\\n'.$od['od_settle_case'].' 부분취소(금액: '.number_format($mod_mny).'원) - '.G5_TIME_YMDHIS;
|
||||
|
||||
// 환불금액기록
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_refund_price = od_refund_price + '$mod_mny',
|
||||
od_misu = '$od_misu',
|
||||
od_tax_mny = '$od_tax_mny',
|
||||
od_vat_mny = '$od_vat_mny',
|
||||
od_free_mny = '$od_free_mny',
|
||||
od_shop_memo = concat(od_shop_memo, \"$shop_memo\")
|
||||
od_shop_memo = concat(od_shop_memo, \"$mod_memo\")
|
||||
where od_id = '{$od['od_id']}'
|
||||
and od_tno = '$tno' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 미수금 등의 정보 업데이트
|
||||
$info = get_order_info($od_id);
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_misu = '{$info['od_misu']}',
|
||||
od_tax_mny = '{$info['od_tax_mny']}',
|
||||
od_vat_mny = '{$info['od_vat_mny']}',
|
||||
od_free_mny = '{$info['od_free_mny']}'
|
||||
where od_id = '$od_id' ";
|
||||
sql_query($sql);
|
||||
} // End of [res_cd = "0000"]
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
@ -633,9 +633,8 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
|
||||
/* 새창 기본 스타일 */
|
||||
.new_win {}
|
||||
.new_win h1 {margin-bottom:20px;padding:0 20px;height:60px;border-top:2px solid #484848;border-bottom:1px solid #e9e9e9;background:#fff;font-size:1.2em;line-height:5em}
|
||||
.new_win h2 {margin:0 auto 10px;width:93%}
|
||||
.new_win table {margin:0 auto 20px;width:93%;background:#fff}
|
||||
.new_win h1 {margin-bottom:20px;padding:0 20px;min-width:320px/* 적정값으로 변경하여 사용하세요. */;height:60px;border-top:2px solid #484848;border-bottom:1px solid #e9e9e9;background:#fff;font-size:1.2em;line-height:5em}
|
||||
.new_win h2 {margin:0 20px 10px}
|
||||
.new_win_ul {margin:-20px 0 20px 0;padding:0 0 0 20px;border-bottom:1px solid #515151;background:#484848;list-style:none;zoom:1}
|
||||
.new_win_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.new_win_ul li {float:left;margin-left:-1px}
|
||||
@ -643,7 +642,7 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
.new_win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #595959;border-left:1px solid #595959;color:#fff;font-family:dotum;font-weight:bold;text-decoration:none}
|
||||
.new_win_desc {margin:0 auto;width:93%}
|
||||
.new_win .anchor {margin:0 auto 5px;width:93%}
|
||||
.new_win .tbl_wrap {margin:0;padding:0}
|
||||
.new_win .tbl_wrap {margin:0 20px 20px;padding:0}
|
||||
|
||||
/* 자바스크립트 alert 대안 */
|
||||
#validation_check {margin:100px auto;width:500px}
|
||||
|
||||
@ -25,7 +25,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
}
|
||||
|
||||
$g_conf_site_cd = $_POST['site_cd'];
|
||||
$g_conf_site_key = $default['de_kcp_mid'];
|
||||
|
||||
if (preg_match("/^T000/", $g_conf_site_cd) || $default['de_card_test']) {
|
||||
$g_conf_gw_url = "testpaygw.kcp.co.kr"; // real url : paygw.kcp.co.kr , test url : testpaygw.kcp.co.kr
|
||||
|
||||
Reference in New Issue
Block a user