관리자 부분취소 처리 코드 간소화
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", ""));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user