diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index 25f936a4..2beb3855 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -45,7 +45,7 @@ alt="Asiahighlights logo" class="asiahighlightslogo img-responsive">
analysis_orderid($pn_invoice); } else { $orderid_info = $this->analysis_orderid($data['note']->pn_invoice); - } + } + $data['pn_invoice'] = $pn_invoice ? $pn_invoice : $data['note']->pn_invoice; if (!empty($orderid_info)) { $orderid_info = json_decode($orderid_info); $data['order_info'] = $this->Paypal_model->get_order($orderid_info->orderid, true, $orderid_info->ordertype); } - $data['pn_invoice'] = $pn_invoice ? $pn_invoice : $data['note']->pn_invoice ; + + $order_sn = empty($data['order_info']) ? 0 : $data['order_info']->COLI_SN; + $data['group_accout_info'] = + $this->Paypal_model->get_group_accout_info($order_sn, $data['note']->pn_txn_id); echo json_encode($this->load->view('note_setting', $data, true)); return true; } diff --git a/webht/third_party/paypal/models/paypal_model.php b/webht/third_party/paypal/models/paypal_model.php index f31216f9..de8fd5f0 100644 --- a/webht/third_party/paypal/models/paypal_model.php +++ b/webht/third_party/paypal/models/paypal_model.php @@ -86,6 +86,30 @@ class Paypal_model extends CI_Model { return $result; } + /** + * 查找付款记录,用于判断是否已经审核。 + * 已经审核过得记录不能修改订单号。 + */ + public function get_group_accout_info($coli_sn, $pn_txn_id) { + // select * from BIZ_GroupAccountInfo where GAI_COLI_SN = 559007281 and GAI_AccreditNo = '91R84932UM059045C' + $info_sql = "select GAI_SN, GAI_State from BIZ_GroupAccountInfo + where GAI_COLI_SN = $coli_sn and GAI_AccreditNo = '$pn_txn_id' + union + select GAI_SN, GAI_State from GroupAccountInfo + where GAI_COLI_SN = $coli_sn and GAI_AccreditNo = '$pn_txn_id'"; + + $info_query = $this->HT->query($info_sql); + $info_result = $info_query->result(); + $group_accout_info = array( + 'GAI_SN' => 0, + 'GAI_State' => 0 + ); + if (!empty($info_empty)) { + $group_accout_info = $info_result[0]; + } + return $group_accout_info; + } + //获取收款记录(商务订单) public function get_money_list($GAI_COLI_ID, $GAI_SQJE=null, $GAI_SQJECurrency=null) { $je_sql = $GAI_SQJE===null ? " " : " and GAI_SQJE=? "; diff --git a/webht/third_party/paypal/views/note_setting.php b/webht/third_party/paypal/views/note_setting.php index 241f3bc6..f1badbdd 100644 --- a/webht/third_party/paypal/views/note_setting.php +++ b/webht/third_party/paypal/views/note_setting.php @@ -43,12 +43,21 @@