diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 4a0c9567..b895c87b 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1379,7 +1379,18 @@ class Index extends CI_Controller { } } $all_list = $this->target_amount_recursive($currency, $amount, 0, $from_date, $allmost_day, array(), $last_notice_sn); - $export_list = $all_list['list']; + + $filter_list = []; + $txn_list = []; + $query_list = $all_list['list']; + foreach ($query_list as $key => $row) { + if (!in_array($row->pn_txn_id, $txn_list)) { + $txn_list[] = $row->pn_txn_id; + $filter_list[] = $row; + } + } + + $export_list = $filter_list; // 修改导出的第一条记录, 金额改为剩余金额 if ( ! empty($last_notice_record[0]) && $last_notice_record[0]->TEL_transactionNoticeId==$export_list[0]->pn_sn) { $export_list[0]->pn_mc_gross = bcsub($last_notice_record[0]->TEL_transactionAmount, $last_notice_record[0]->TEL_exportAmount); diff --git a/webht/third_party/paypal/models/note_model.php b/webht/third_party/paypal/models/note_model.php index c18242b2..07a02bf4 100644 --- a/webht/third_party/paypal/models/note_model.php +++ b/webht/third_party/paypal/models/note_model.php @@ -101,7 +101,7 @@ class Note_model extends CI_Model { $sql .= " pn.pn_sn ,pn.pn_txn_id - --,pn.pn_invoice + ,dbo.GetOrderCusCountry(pn_invoice) as payer_country ,replace(replace(pn.pn_invoice,char(13),' '),char(10),' ') pn_invoice ,pn.pn_custom ,pn.pn_mc_gross @@ -200,7 +200,9 @@ class Note_model extends CI_Model { } $this->search = $search_sql; $this->orderby = " order by pn.pn_sn asc"; - return $this->get_list(); + + $query_list = $this->get_list(); + return $query_list; }