Merge branch 'master' of github.com:gnuboard/yc5
This commit is contained in:
@ -53,6 +53,7 @@ include_once(G5_SHOP_PATH.'/kcp/pp_ax_hub_lib.php');
|
||||
$req_tx = 'mod_escrow';
|
||||
$mod_type = 'STE1';
|
||||
$mod_desc = '에스크로 배송시작 등록';
|
||||
$cust_ip = getenv('REMOTE_ADDR');
|
||||
|
||||
$c_PayPlus = new C_PP_CLI;
|
||||
$c_PayPlus->mf_clear();
|
||||
@ -60,18 +61,18 @@ $c_PayPlus->mf_clear();
|
||||
$tran_cd = "00200000";
|
||||
|
||||
// 에스크로 상태변경
|
||||
$tno_count = count($arr_tno);
|
||||
$tno_count = count($escrow_tno);
|
||||
for($i=0; $i<$tno_count; $i++) {
|
||||
if(!$arr_tno[$i] || !$arr_corp[$i] || !$arr_numb[$i])
|
||||
if(!$escrow_tno[$i] || !$escrow_corp[$i] || !$escrow_numb[$i])
|
||||
continue;
|
||||
|
||||
$c_PayPlus->mf_set_modx_data( "tno", $arr_tno[$i] );
|
||||
$c_PayPlus->mf_set_modx_data( "mod_type", $mod_type );
|
||||
$c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip );
|
||||
$c_PayPlus->mf_set_modx_data( "mod_desc", $mod_desc );
|
||||
$c_PayPlus->mf_set_modx_data( "tno", $escrow_tno[$i] );
|
||||
$c_PayPlus->mf_set_modx_data( "mod_type", $mod_type );
|
||||
$c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip );
|
||||
$c_PayPlus->mf_set_modx_data( "mod_desc", $mod_desc );
|
||||
|
||||
$c_PayPlus->mf_set_modx_data( "deli_numb", $arr_numb[$i] );
|
||||
$c_PayPlus->mf_set_modx_data( "deli_corp", $arr_corp[$i] );
|
||||
$c_PayPlus->mf_set_modx_data( "deli_numb", $escrow_numb[$i] );
|
||||
$c_PayPlus->mf_set_modx_data( "deli_corp", $escrow_corp[$i] );
|
||||
|
||||
$c_PayPlus->mf_do_tx( $trace_no, $g_conf_home_dir, $g_conf_site_cd, $g_conf_site_key, $tran_cd, "",
|
||||
$g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", $ordr_idxx,
|
||||
|
||||
@ -25,39 +25,6 @@ sql_query($sql);
|
||||
save_order_point("완료");
|
||||
|
||||
|
||||
/*
|
||||
//------------------------------------------------------------------------------
|
||||
// 주문완료 포인트
|
||||
// 설정일이 지난 포인트 부여되지 않은 배송완료된 장바구니 자료에 포인트 부여
|
||||
// 설정일이 0 이면 주문서 완료 설정 시점에서 포인트를 바로 부여합니다.
|
||||
//------------------------------------------------------------------------------
|
||||
if (!isset($order_not_point)) {
|
||||
$beforedays = date("Y-m-d H:i:s", ( time() - (60 * 60 * 24 * (int)$default['de_point_days']) ) );
|
||||
$sql = " select * from {$g5['g5_shop_cart_table']}
|
||||
where ct_status = '완료'
|
||||
and ct_point_use = '0'
|
||||
and ct_time <= '$beforedays' ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 회원 ID 를 얻는다.
|
||||
$tmp_row = sql_fetch("select od_id, mb_id from {$g5['g5_shop_order_table']} where od_id = '{$row['od_id']}' ");
|
||||
|
||||
// 회원이면서 포인트가 0보다 크다면
|
||||
if ($tmp_row['mb_id'] && $row['ct_point'] > 0)
|
||||
{
|
||||
$po_point = $row['ct_point'] * $row['ct_qty'];
|
||||
$po_content = "$cart_title3 {$tmp_row['od_id']} ({$row['ct_id']}) $cart_title4";
|
||||
insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['ct_id']}");
|
||||
}
|
||||
|
||||
sql_query("update {$g5['g5_shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 주문서 정보
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -59,27 +59,15 @@ include "./ordersms.inc.php";
|
||||
|
||||
|
||||
// 에스크로 배송처리
|
||||
if($_POST['od_tno'] && $_POST['od_escrow'] == 1)
|
||||
if($_POST['od_tno'] && $_POST['od_escrow'] == 1)
|
||||
{
|
||||
$arr_tno = array();
|
||||
$arr_corp = array();
|
||||
$arr_numb = array();
|
||||
$escrow_tno = array();
|
||||
$escrow_corp = array();
|
||||
$escrow_numb = array();
|
||||
|
||||
/*
|
||||
// 배송회사정보
|
||||
$sql = " select dl_company from {$g5['g5_shop_delivery_table']} where dl_id = '$dl_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$arr_tno[0] = $_POST['od_tno'];
|
||||
$arr_corp[0] = $row['dl_company'];
|
||||
$arr_numb[0] = $od_invoice;
|
||||
$cust_ip = getenv('REMOTE_ADDR');
|
||||
*/
|
||||
|
||||
$arr_tno[0] = $_POST['od_tno'];
|
||||
$arr_corp[0] = $od_delivery_company;
|
||||
$arr_numb[0] = $od_invoice;
|
||||
$cust_ip = getenv('REMOTE_ADDR');
|
||||
$escrow_tno[0] = $_POST['od_tno'];
|
||||
$escrow_corp[0] = $_POST['od_delivery_company'];
|
||||
$escrow_numb[0] = $_POST['od_invoice'];
|
||||
|
||||
include_once('./orderescrow.inc.php');
|
||||
}
|
||||
|
||||
@ -65,8 +65,7 @@ if ($od_receipt_point) {
|
||||
}
|
||||
|
||||
if ($od_coupon) {
|
||||
// 개별상품쿠폰, 배송비쿠폰, 주문금액쿠폰
|
||||
$where[] = " (od_cart_coupon + od_send_coupon + od_coupon) != 0 ";
|
||||
$where[] = " od_coupon != 0 ";
|
||||
}
|
||||
|
||||
if ($fr_date && $to_date) {
|
||||
@ -181,7 +180,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<input type="checkbox" name="od_receipt_point" value="Y" id="od_misu04" <?php echo get_checked($od_receipt_point, 'Y'); ?>>
|
||||
<label for="od_misu04">포인트주문</label>
|
||||
<input type="checkbox" name="od_coupon" value="Y" id="od_misu05" <?php echo get_checked($od_coupon, 'Y'); ?>>
|
||||
<label for="od_misu05">쿠폰할인</label>
|
||||
<label for="od_misu05">쿠폰</label>
|
||||
</div>
|
||||
|
||||
<div class="sch_last">
|
||||
@ -407,6 +406,16 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
if ($od_status == '배송') $change_status = "완료";
|
||||
?>
|
||||
<label><input type="checkbox" name="od_status" value="<?php echo $change_status; ?>"> '<?php echo $od_status ?>'상태에서 '<strong><?php echo $change_status ?></strong>'상태로 변경합니다.</label>
|
||||
<?php if($od_status == '주문' || $od_status == '준비') { ?>
|
||||
<input type="checkbox" name="od_send_mail" value="1" id="od_send_mail" checked="checked">
|
||||
<label for="od_send_mail"><?php echo $change_status; ?>안내 메일</label>
|
||||
<input type="checkbox" name="send_sms" value="1" id="od_send_sms" checked="checked">
|
||||
<label for="od_send_sms"><?php echo $change_status; ?>안내 SMS</label>
|
||||
<?php } ?>
|
||||
<?php if($od_status == '준비') { ?>
|
||||
<input type="checkbox" name="send_escrow" value="1" id="od_send_escrow">
|
||||
<label for="od_send_escrow">에스크로배송등록</label>
|
||||
<?php } ?>
|
||||
<input type="submit" value="선택수정" class="btn_submit" onclick="document.pressed=this.value">
|
||||
<?php if ($od_status == '주문') { ?> <span>주문상태에서만 삭제가 가능합니다.</span> <input type="submit" value="선택삭제" class="btn_submit" onclick="document.pressed=this.value"><?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
@ -1,9 +1,28 @@
|
||||
<?php
|
||||
$sub_menu = '400400';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
|
||||
define("_ORDERMAIL_", true);
|
||||
|
||||
//print_r2($_POST); exit;
|
||||
|
||||
$sms_count = 0;
|
||||
if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'])
|
||||
{
|
||||
$SMS = new SMS;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
}
|
||||
|
||||
$escrow_count = 0;
|
||||
if($_POST['send_escrow']) {
|
||||
$escrow_tno = array();
|
||||
$escrow_corp = array();
|
||||
$escrow_numb = array();
|
||||
$escrow_idx = 0;
|
||||
}
|
||||
|
||||
// 상품옵션별재고 또는 상품재고에 더하기
|
||||
function add_io_stock($it_id, $ct_qty, $io_id="", $io_type=0)
|
||||
{
|
||||
@ -72,7 +91,10 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']} set od_delivery_company = '{$delivery['delivery_company']}', od_invoice = '{$delivery['invoice']}', od_invoice_time = '{$delivery['invoice_time']}' where od_id = '$od_id' and od_status = '배송' ";
|
||||
if($change_status != '배송')
|
||||
return;
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']} set od_delivery_company = '{$delivery['delivery_company']}', od_invoice = '{$delivery['invoice']}', od_invoice_time = '{$delivery['invoice_time']}' where od_id = '$od_id' and od_status = '준비' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
|
||||
@ -80,54 +102,46 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 재고를 이미 사용했거나 재고에서 이미 뺐다면
|
||||
// 재고를 사용하지 않았다면
|
||||
$stock_use = $row['ct_stock_use'];
|
||||
|
||||
if ($row['ct_stock_use'])
|
||||
if(!$row['ct_stock_use'])
|
||||
{
|
||||
if ($change_status == '주문' ||
|
||||
$change_status == '취소' ||
|
||||
$change_status == '반품' ||
|
||||
$change_status == '품절')
|
||||
{
|
||||
// 재고에 다시 더한다.
|
||||
add_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
|
||||
$stock_use = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 재고 오류로 인한 수정
|
||||
if ($change_status == '배송' ||
|
||||
$change_status == '완료')
|
||||
{
|
||||
// 재고에서 뺀다.
|
||||
subtract_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
|
||||
$stock_use = 1;
|
||||
}
|
||||
}
|
||||
// 재고에서 뺀다.
|
||||
subtract_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
|
||||
$stock_use = 1;
|
||||
|
||||
$point_use = $row['ct_point_use'];
|
||||
|
||||
// 회원이면서 포인트가 0보다 크거나 이미 포인트를 부여했다면 뺀다.
|
||||
if ($mb_id && $row['ct_point'] && $row['ct_point_use'])
|
||||
{
|
||||
delete_point($mb_id, "@delivery", $mb_id, "$od_id,{$row['ct_id']}");
|
||||
$point_use = 0;
|
||||
$sql = " update {$g5['g5_shop_cart_table']} set ct_stock_use = '$stock_use' where od_id = '{$row['ct_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
/*
|
||||
$sql = " update {$g5['g5_shop_cart_table']}
|
||||
set ct_point_use = '$point_use',
|
||||
ct_stock_use = '$stock_use',
|
||||
ct_history = CONCAT(ct_history,'$ct_history')
|
||||
where od_id = '$od_id' ";
|
||||
*/
|
||||
$sql = " update {$g5['g5_shop_cart_table']} set ct_point_use = '$point_use', ct_stock_use = '$stock_use' where od_id = '$od_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
// 처리내용 SMS
|
||||
function conv_sms_contents($od_id, $contents)
|
||||
{
|
||||
global $g5, $config, $default;
|
||||
|
||||
$sms_contents = '';
|
||||
|
||||
if ($od_id && $config['cf_sms_use'] == 'icode')
|
||||
{
|
||||
$sql = " select od_id, od_name, od_invoice, od_receipt_price, od_delivery_company
|
||||
from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
|
||||
$od = sql_fetch($sql);
|
||||
|
||||
$sms_contents = $contents;
|
||||
$sms_contents = preg_replace("/{이름}/", $od['od_name'], $sms_contents);
|
||||
$sms_contents = preg_replace("/{입금액}/", number_format($od['od_receipt_price']), $sms_contents);
|
||||
$sms_contents = preg_replace("/{택배회사}/", $od['od_delivery_company'], $sms_contents);
|
||||
$sms_contents = preg_replace("/{운송장번호}/", $od['od_invoice'], $sms_contents);
|
||||
$sms_contents = preg_replace("/{주문번호}/", $od['od_id'], $sms_contents);
|
||||
$sms_contents = preg_replace("/{회사명}/", $default['de_admin_company_name'], $sms_contents);
|
||||
}
|
||||
|
||||
return iconv("utf-8", "euc-kr", stripslashes($sms_contents));
|
||||
}
|
||||
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
@ -155,6 +169,25 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
if ($od['od_settle_case'] != '무통장') continue;
|
||||
change_status($od_id, '주문', '입금');
|
||||
order_update_receipt($od_id);
|
||||
|
||||
// SMS
|
||||
if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $default['de_sms_use4']) {
|
||||
$sms_contents = conv_sms_contents($od_id, $default['de_sms_cont4']);
|
||||
if($sms_contents) {
|
||||
$receive_number = preg_replace("/[^0-9]/", "", $od['od_hp']); // 수신자번호
|
||||
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호
|
||||
|
||||
if($receive_number && $send_number) {
|
||||
$SMS->Add($receive_number, $send_number, $config['cf_icode_id'], $sms_contents, "");
|
||||
$sms_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 메일
|
||||
if($config['cf_email_use'] && $_POST['od_send_mail'])
|
||||
include './ordermail.inc.php';
|
||||
|
||||
break;
|
||||
|
||||
case '입금' :
|
||||
@ -164,67 +197,42 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
|
||||
case '준비' :
|
||||
if ($change_status != '배송') continue;
|
||||
change_status($od_id, '준비', '배송');
|
||||
|
||||
$delivery['invoice'] = $invoice;
|
||||
$delivery['invoice_time'] = $invoice_time;
|
||||
$delivery['delivery_company'] = $delivery_company;
|
||||
|
||||
order_update_delivery($od_id, $od['mb_id'], $change_status, $delivery);
|
||||
change_status($od_id, '준비', '배송');
|
||||
|
||||
/*
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_delivery_company = '$delivery_company',
|
||||
od_invoice = '$invoice',
|
||||
od_invoice_time = '$invoice_time'
|
||||
where od_id = '$od_id' and od_status = '배송' ";
|
||||
sql_query($sql, true);
|
||||
// SMS
|
||||
if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $default['de_sms_use5']) {
|
||||
$sms_contents = conv_sms_contents($od_id, $default['de_sms_cont5']);
|
||||
if($sms_contents) {
|
||||
$receive_number = preg_replace("/[^0-9]/", "", $od['od_hp']); // 수신자번호
|
||||
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 재고를 이미 사용했거나 재고에서 이미 뺐다면
|
||||
$stock_use = $row['ct_stock_use'];
|
||||
|
||||
if ($row['ct_stock_use'])
|
||||
{
|
||||
if ($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절')
|
||||
{
|
||||
$stock_use = 0;
|
||||
// 재고에 다시 더한다.
|
||||
add_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
|
||||
if($receive_number && $send_number) {
|
||||
$SMS->Add($receive_number, $send_number, $config['cf_icode_id'], $sms_contents, "");
|
||||
$sms_count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 재고 오류로 인한 수정
|
||||
if ($ct_status == '배송' || $ct_status == '완료')
|
||||
{
|
||||
$stock_use = 1;
|
||||
// 재고에서 뺀다.
|
||||
subtract_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
|
||||
}
|
||||
}
|
||||
|
||||
$point_use = $row['ct_point_use'];
|
||||
|
||||
// 회원이면서 포인트가 0보다 크거나 이미 포인트를 부여했다면 뺀다.
|
||||
if ($od['mb_id'] && $row['ct_point'] && $row['ct_point_use'])
|
||||
{
|
||||
$point_use = 0;
|
||||
delete_point($od['mb_id'], "@delivery", $od['mb_id'], "$od_id,{$row['ct_id']}");
|
||||
}
|
||||
|
||||
$sql = " update {$g5['g5_shop_cart_table']}
|
||||
set ct_point_use = '$point_use',
|
||||
ct_stock_use = '$stock_use',
|
||||
ct_history = CONCAT(ct_history,'$ct_history')
|
||||
where od_id = '{$row['od_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
*/
|
||||
|
||||
// 메일
|
||||
if($config['cf_email_use'] && $_POST['od_send_mail'])
|
||||
include './ordermail.inc.php';
|
||||
|
||||
// 에스크로 배송
|
||||
if($_POST['send_escrow'] && $od['od_tno'] && $od['od_escrow']) {
|
||||
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
|
||||
$escrow_tno[$escrow_idx] = $od['od_tno'];
|
||||
$escrow_numb[$escrow_idx] = $od['od_invoice'];
|
||||
$escrow_corp[$escrow_idx] = $od['od_delivery_company'];
|
||||
$escrow_idx++;
|
||||
$escrow_count++;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -251,6 +259,18 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
|
||||
}
|
||||
|
||||
// SMS
|
||||
if($config['cf_sms_use'] == 'icode' && $_POST['send_sms'] && $sms_count)
|
||||
{
|
||||
$SMS->Send();
|
||||
}
|
||||
|
||||
// 에스크로 배송
|
||||
if($_POST['send_escrow'] && $escrow_count)
|
||||
{
|
||||
include_once('./orderescrow.inc.php');
|
||||
}
|
||||
|
||||
$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search";
|
||||
$qstr .= "&od_status=$od_status";
|
||||
$qstr .= "&od_settle_case=$od_settle_case";
|
||||
|
||||
@ -71,13 +71,8 @@ if ($od_send_mail)
|
||||
|
||||
// 배송정보
|
||||
$is_delivery = false;
|
||||
if ((int)$od[dl_id] > 0) {
|
||||
$dl = sql_fetch(" select * from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
|
||||
|
||||
$delivery_list['dl_url'] = $dl['dl_url'];
|
||||
if (strpos($delivery_list['dl_url'], "=")) $delivery_list['dl_url'] .= $od['od_invoice'];
|
||||
$delivery_list['dl_company'] = $dl['dl_company'];
|
||||
$delivery_list['dl_tel'] = $dl['dl_tel'];
|
||||
if ($od['od_delivery_company'] && $od['od_invoice']) {
|
||||
$delivery_list['dl_company'] = $od['od_delivery_company'];
|
||||
$delivery_list['od_invoice'] = $od['od_invoice'];
|
||||
$delivery_list['od_invoice_time'] = $od['od_invoice_time'];
|
||||
|
||||
|
||||
@ -1779,7 +1779,7 @@ function is_used_coupon($mb_id, $cp_id)
|
||||
//------------------------------------------------------------------------------
|
||||
function save_order_point($ct_status="완료")
|
||||
{
|
||||
global $default;
|
||||
global $g5, $default;
|
||||
|
||||
$beforedays = date("Y-m-d H:i:s", ( time() - (86400 * (int)$default['de_point_days']) ) ); // 86400초는 하루
|
||||
$sql = " select * from {$g5['g5_shop_cart_table']} where ct_status = '$ct_status' and ct_point_use = '0' and ct_time <= '$beforedays' ";
|
||||
|
||||
@ -275,6 +275,10 @@ if ($od_settle_case == "무통장")
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_price = 0;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
if($od_misu == 0) {
|
||||
$od_status = '입금';
|
||||
$od_receipt_time = G5_TIME_YMDHIS;
|
||||
}
|
||||
}
|
||||
else if ($od_settle_case == "계좌이체")
|
||||
{
|
||||
|
||||
@ -449,19 +449,12 @@ include_once(G5_MSHOP_PATH.'/_head.php');
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
// 배송회사 정보
|
||||
$dl = sql_fetch(" select * from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
|
||||
|
||||
if ($od['od_invoice'] || !$od['misu'])
|
||||
if ($od['od_invoice'] && $od['od_delivery_company'])
|
||||
{
|
||||
if (is_array($dl))
|
||||
{
|
||||
// get 으로 날리는 경우 운송장번호를 넘김
|
||||
if (strpos($dl['dl_url'], "=")) $invoice = $od['od_invoice'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">배송회사</th>
|
||||
<td><?php echo $dl['dl_company']; ?> [<a href="<?php echo $dl['dl_url'].$invoice; ?>" target="_blank">배송조회하기</a>]</td>
|
||||
<td><?php echo $od['od_delivery_company']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">운송장번호</th>
|
||||
@ -471,20 +464,15 @@ include_once(G5_MSHOP_PATH.'/_head.php');
|
||||
<th scope="row">배송일시</th>
|
||||
<td><?php echo $od['od_invoice_time']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>고객센터 전화</th>
|
||||
<td><?php echo $dl['dl_tel']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td class="empty_table">아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
@ -544,7 +532,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
|
||||
<?php } ?>
|
||||
</section>
|
||||
|
||||
<?php if ($od['od_settle_case'] == '가상계좌' && $default['de_card_test'] && $is_admin) {
|
||||
<?php if ($od['od_settle_case'] == '가상계좌' && $od['od_misu'] > 0 && $default['de_card_test'] && $is_admin) {
|
||||
preg_match("/(\s[^\s]+\s)/", $od['od_bank_account'], $matchs);
|
||||
$deposit_no = trim($matchs[1]);
|
||||
?>
|
||||
|
||||
@ -123,7 +123,7 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row" style="<?php echo $th_st; ?>">배송회사</th>
|
||||
<td style="<?php echo $td_st; ?>"><a href="<?php echo $delivery_list['dl_url']; ?>" target="_blank" style="text-decoration:none"><?php echo $delivery_list['dl_company']; ?></a></td>
|
||||
<td style="<?php echo $td_st; ?>"><?php echo $delivery_list['dl_company']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="<?php echo $th_st; ?>">운송장번호</th>
|
||||
@ -133,10 +133,6 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
|
||||
<th scope="row" style="<?php echo $th_st; ?>">배송일시</th>
|
||||
<td style="<?php echo $td_st; ?>"><?php echo $delivery_list['od_invoice_time']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="<?php echo $th_st; ?>">대표전화</th>
|
||||
<td style="<?php echo $td_st; ?>"><?php echo $delivery_list['dl_tel']; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
@ -270,6 +270,10 @@ if ($od_settle_case == "무통장")
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_price = 0;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
if($od_misu == 0) {
|
||||
$od_status = '입금';
|
||||
$od_receipt_time = G5_TIME_YMDHIS;
|
||||
}
|
||||
}
|
||||
else if ($od_settle_case == "계좌이체")
|
||||
{
|
||||
@ -537,7 +541,7 @@ if($config['cf_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'])
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($config'cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$sms_count = 0;
|
||||
|
||||
for($s=0; $s<count($sms_contents); $s++) {
|
||||
|
||||
@ -460,19 +460,12 @@ if(openwin != null) {
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
// 배송회사 정보
|
||||
$dl = sql_fetch(" select * from {$g5['g5_shop_delivery_table']} where dl_id = '{$od['dl_id']}' ");
|
||||
|
||||
if ($od['od_invoice'] || !$od['misu'])
|
||||
if ($od['od_invoice'] && $od['od_delivery_company'])
|
||||
{
|
||||
if (is_array($dl))
|
||||
{
|
||||
// get 으로 날리는 경우 운송장번호를 넘김
|
||||
if (strpos($dl['dl_url'], "=")) $invoice = $od['od_invoice'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">배송회사</th>
|
||||
<td><?php echo $dl['dl_company']; ?> [<a href="<?php echo $dl['dl_url'].$invoice; ?>" target="_blank">배송조회하기</a>]</td>
|
||||
<td><?php echo $od['od_delivery_company']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">운송장번호</th>
|
||||
@ -482,20 +475,15 @@ if(openwin != null) {
|
||||
<th scope="row">배송일시</th>
|
||||
<td><?php echo $od['od_invoice_time']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>고객센터 전화</th>
|
||||
<td><?php echo $dl['dl_tel']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td class="empty_table">아직 배송하지 않았거나 배송정보를 입력하지 못하였습니다.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
@ -555,7 +543,7 @@ if(openwin != null) {
|
||||
<?php } ?>
|
||||
</section>
|
||||
|
||||
<?php if ($od['od_settle_case'] == '가상계좌' && $default['de_card_test'] && $is_admin) {
|
||||
<?php if ($od['od_settle_case'] == '가상계좌' && $od['od_misu'] > 0 && $default['de_card_test'] && $is_admin) {
|
||||
preg_match("/\s{1}([^\s]+)\s?/", $od['od_bank_account'], $matchs);
|
||||
$deposit_no = trim($matchs[1]);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user