현금영수증 필드 정리

This commit is contained in:
chicpro
2013-11-08 16:43:43 +09:00
parent f3f54bb622
commit 449730f00f
3 changed files with 36 additions and 37 deletions

View File

@ -672,4 +672,17 @@ if(!sql_query(" select de_item_use_write from {$g5['g5_shop_default_table']} ",
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_item_use_write` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_item_use_use` ", true);
}
// 현금영수증 필드 정리
if(!sql_query(" select od_cash_info from {$g5['g5_shop_order_table']} limit 1", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}`
MODIFY `od_cash` tinyint(4) NOT NULL DEFAULT '0' AFTER `od_free_mny`,
ADD `od_cash_info` text NOT NULL AFTER `od_cash_no`,
DROP `od_cash_receipt_no`,
DROP `od_cash_app_time`,
DROP `od_cash_reg_stat`,
DROP `od_cash_reg_desc`,
DROP `od_cash_tr_code`,
DROP `od_cash_id_info` ", true);
}
?>

View File

@ -314,22 +314,6 @@ CREATE TABLE IF NOT EXISTS `g5_shop_default` (
-- --------------------------------------------------------
--
-- Table structure for table `g5_shop_delivery`
--
DROP TABLE IF EXISTS `g5_shop_delivery`;
CREATE TABLE IF NOT EXISTS `g5_shop_delivery` (
`dl_id` int(11) NOT NULL AUTO_INCREMENT,
`dl_company` varchar(255) NOT NULL DEFAULT '',
`dl_url` varchar(255) NOT NULL DEFAULT '',
`dl_tel` varchar(255) NOT NULL DEFAULT '',
`dl_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`dl_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g5_shop_event`
--
@ -653,10 +637,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_order` (
`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 '',
`dl_id` int(11) NOT NULL DEFAULT '0',
`od_invoice` varchar(255) NOT NULL DEFAULT '',
`od_invoice_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`od_status` varchar(255) NOT NULL DEFAULT '',
`od_hope_date` date NOT NULL DEFAULT '0000-00-00',
`od_settle_case` varchar(255) NOT NULL DEFAULT '',
`od_tno` varchar(255) NOT NULL DEFAULT '',
@ -666,14 +647,12 @@ CREATE TABLE IF NOT EXISTS `g5_shop_order` (
`od_tax_mny` int(11) NOT NULL DEFAULT '0',
`od_vat_mny` int(11) NOT NULL DEFAULT '0',
`od_free_mny` int(11) NOT NULL DEFAULT '0',
`od_cash_no` varchar(255) NOT NULL,
`od_cash_receipt_no` varchar(255) NOT NULL,
`od_cash_app_time` varchar(255) NOT NULL,
`od_cash_reg_stat` varchar(255) NOT NULL,
`od_cash_reg_desc` varchar(255) NOT NULL,
`od_cash_tr_code` varchar(255) NOT NULL,
`od_cash_id_info` varchar(255) NOT NULL,
`od_delivery_company` varchar(255) NOT NULL DEFAULT '0',
`od_invoice` varchar(255) NOT NULL DEFAULT '',
`od_invoice_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`od_cash` tinyint(4) NOT NULL,
`od_cash_no` varchar(255) NOT NULL,
`od_cash_info` text NOT NULL,
`od_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`od_mobile` tinyint(4) NOT NULL DEFAULT '0',
`od_ip` varchar(25) NOT NULL DEFAULT '',

View File

@ -30,6 +30,7 @@ if ($row['cnt']) {
if ($default['de_card_test']) {
$default['de_kcp_mid'] = 'T0000';
$default['de_kcp_site_key'] = '3grptw1.zW0GSo4PQdaGvsF__';
}
if ($default['de_kcp_mid'] == 'T0000') {
@ -52,6 +53,7 @@ if ($row['cnt']) {
$g_conf_user_type = "PGNW"; // 변경 불가
//$g_conf_site_id = $default[de_kcp_mid]; // 리얼 반영시 KCP에 발급된 site_cd 사용 ex) T0000
$g_conf_site_id = strlen($default['de_kcp_mid']) == 3 ? "SR".$default['de_kcp_mid'] : $default['de_kcp_mid']; // 리얼 반영시 KCP에 발급된 site_cd 사용 ex) T0000
$g_conf_site_key = $default['de_kcp_site_key'];
/* ============================================================================== */
/* ============================================================================== */
@ -187,7 +189,7 @@ if ($row['cnt']) {
if ( strlen($tx_cd) > 0 )
{
$c_PayPlus->mf_do_tx( "", $g_conf_home_dir, $g_conf_site_id,
"", $tx_cd, "",
$g_conf_site_key, $tx_cd, "",
$g_conf_pa_url, $g_conf_pa_port, "payplus_cli_slib",
$ordr_idxx, $cust_ip, $g_conf_log_level,
"", $g_conf_tx_mode );
@ -227,15 +229,20 @@ if ($row['cnt']) {
/* = -------------------------------------------------------------------------- = */
$bSucc = ""; // DB 작업 실패일 경우 "false" 로 세팅
// 결과값 serialize
$cash = array();
$cash['receipt_no'] = $receipt_no;
$cash['app_time'] = $app_time;
$cash['reg_stat'] = $reg_stat;
$cash['reg_desc'] = iconv("cp949", "utf-8", $reg_desc);
$cash['tr_code'] = $tr_code;
$cash['id_info'] = $id_info;
$cash_info = serialize($cash);
$sql = " update {$g5['g5_shop_order_table']}
set od_cash_no = '$cash_no',
od_cash_receipt_no = '$receipt_no',
od_cash_app_time = '$app_time',
od_cash_reg_stat = '$reg_stat',
od_cash_reg_desc = '".iconv("cp949", "utf-8", $reg_desc)."',
od_cash_tr_code = '$tr_code',
od_cash_id_info = '$id_info',
od_cash = '1'
set od_cash = '1'
od_cash_no = '$cash_no',
od_cash_info = '$cash_info'
where od_id = '$ordr_idxx' ";
$result = sql_query($sql);
if (!$result) $bSucc = "false";
@ -255,7 +262,7 @@ if ($row['cnt']) {
$c_PayPlus->mf_set_modx_data( "trad_time", $trad_time );
$c_PayPlus->mf_do_tx( "", $g_conf_home_dir, $g_conf_site_id,
"", $tx_cd, "",
$g_conf_site_key, $tx_cd, "",
$g_conf_pa_url, $g_conf_pa_port, "payplus_cli_slib",
$ordr_idxx, $cust_ip, $g_conf_log_level,
"", $g_conf_tx_mode );