diff --git a/application/controllers/information.php b/application/controllers/information.php index b69108cc..8ba2e259 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1199,9 +1199,11 @@ class Information extends CI_Controller public function test_price() { - $price_rule = '
#ah-8,st,2#
#ah-8,st,2#
'; - $price_tag_list = $this->parse_price_tag($price_rule); - var_dump($price_tag_list); + $price_rule = '
#ah-23,st,2#
'; + $price_item_array = $this->price_pregmatch($price_rule); + var_dump($price_item_array); + $price_tag_list = $this->parse_price_tag($price_rule); + var_dump($price_tag_list); } /*! diff --git a/webht/third_party/paypal/models/note_model.php b/webht/third_party/paypal/models/note_model.php index db756a63..49d98b22 100644 --- a/webht/third_party/paypal/models/note_model.php +++ b/webht/third_party/paypal/models/note_model.php @@ -55,12 +55,13 @@ class Note_model extends CI_Model { public function notestatus($topnum = 2, $status = '') { $this->init(); $this->topnum = $topnum; + $sql = " AND pn_memo NOT LIKE '{\"id\":\"WH-%' "; $x_status = strtolower($status) === 'reversal' ? 'revers' : $status; $sql1 = in_array(strtolower($status), ["completed", 'pending']) ? " AND (pn_payment_status='$status' ) " : ""; $sql2 = in_array(strtolower($status), ["refunded", "reversal"]) ? " AND (pn_payment_status like '%$x_status%' ) " : ""; $sql3 = in_array(strtolower($status), ["others"]) ? " AND (pn_payment_status='failed' OR pn_payment_status='denied' ) " : ""; $sql4 = in_array(strtolower($status), ["case"]) ? " AND (pn_memo like '{\"txn_type\":\"new_case\"%' AND pn_mc_gross = '0' ) " : ""; - $this->pn_send = $sql1 . $sql2 . $sql3 . $sql4; + $this->pn_send = $sql1 . $sql2 . $sql3 . $sql4 . $sql; // $this->orderby=" ORDER BY pn_payment_date DESC, pn.pn_sn ASC "; $this->orderby=" ORDER BY CASE pn.pn_send WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.pn_sn DESC "; return $this->get_list(); @@ -77,10 +78,10 @@ class Note_model extends CI_Model { public function search_date($date) { $this->init(); - $search_sql = " AND (pn.pn_datetime BETWEEN '$date 00:00:00' AND '$date 23:59:59' OR isnull(pn_send,'') in ('sendfail','unsend','')) "; + $search_sql = " AND (pn.pn_datetime BETWEEN '$date 00:00:00' AND '$date 23:59:59' OR isnull(pn_send,'') in ('sendfail','unsend','')) AND pn_memo NOT LIKE '{\"id\":\"WH-%' "; // {"id":"WH- $this->search = $search_sql; // $this->orderby=" ORDER BY CASE pn.pn_send WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.pn_sn DESC "; - $this->orderby=" ORDER BY CASE WHEN pn.pn_send='sendfail' AND pn.pn_payment_status='Completed' THEN 1 ELSE 9 END ,pn.pn_sn DESC "; + $this->orderby=" ORDER BY CASE WHEN pn.pn_send='sendfail' AND pn.pn_payment_status='Completed' THEN 1 WHEN pn.pn_send = 'sendfail' THEN 2 ELSE 9 END ,pn.pn_sn DESC "; // WHEN pn.pn_send = 'sendfail' THEN 2 return $this->get_list();