Merge branch 'master' of github.com:gnuboard/yc5

This commit is contained in:
gnuboard
2013-11-08 13:15:02 +09:00

View File

@ -16,16 +16,6 @@ if ($od_receipt_time) {
alert('결제일시 오류입니다.');
}
// 배송정보가 있으면 주문상태 배송으로 변경
$od_status = $od['od_status'];
$cart_status = false;
$order_status = array('입금', '준비');
if($_POST['od_delivery_company'] && $_POST['od_invoice'] && in_array($od['od_status'], $order_status))
{
$od_status = '배송';
$cart_status = true;
}
// 결제정보 반영
$sql = " update {$g5['g5_shop_order_table']}
set od_deposit_name = '{$_POST['od_deposit_name']}',
@ -38,35 +28,64 @@ $sql = " update {$g5['g5_shop_order_table']}
od_invoice = '{$_POST['od_invoice']}',
od_invoice_time = '{$_POST['od_invoice_time']}',
od_send_cost = '{$_POST['od_send_cost']}',
od_send_cost2 = '{$_POST['od_send_cost2']}',
od_status = '$od_status'
od_send_cost2 = '{$_POST['od_send_cost2']}'
where od_id = '$od_id' ";
sql_query($sql);
// 장바구니 상태변경
if($cart_status) {
$sql = " update {$g5['g5_shop_cart_table']}
set ct_status = '$od_status'
where od_id = '$od_id'
and ct_status IN ('".implode("', '", $order_status)."') ";
sql_query($sql);
}
// 주문정보
$info = get_order_info($od_id);
if(!$info)
alert('주문자료가 존재하지 않습니다.');
$od_status = $od['od_status'];
$cart_status = false;
// 미수가 0이고 상태가 주문이었다면 입금으로 변경
if($info['od_misu'] == 0 && $od['od_status'] == '주문')
{
$od_status = '입금';
$cart_status = true;
}
// 배송정보가 있으면 주문상태 배송으로 변경
$order_status = array('입금', '준비');
if($_POST['od_delivery_company'] && $_POST['od_invoice'] && in_array($od['od_status'], $order_status))
{
$od_status = '배송';
$cart_status = true;
}
// 미수금 정보 등 반영
$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']}',
od_send_cost = '{$info['od_send_cost']}'
od_send_cost = '{$info['od_send_cost']}',
od_status = '$od_status'
where od_id = '$od_id' ";
sql_query($sql);
// 장바구니 상태 변경
if($cart_status) {
$sql = " update {$g5['g5_shop_cart_table']}
set ct_status = '$od_status'
where od_id = '$od_id' ";
switch($od_status) {
case '입금':
$sql .= " and ct_status = '주문' ";
break;
case '배송':
$sql .= " and ct_status IN ('".implode("', '", $order_status)."') ";
breask;
default:
;
}
sql_query($sql);
}
// 메일발송
define("_ORDERMAIL_", true);