diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 30671fb4..d7999b09 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1197,6 +1197,7 @@ class Index extends CI_Controller { if ($this->Paypal_model->if_finance_done($advisor_info->COLI_GRI_SN, $late_entry_date_set) === true) { $this->Note_model->update_send($item->pn_txn_id, 'send-to-finance', $item->pn_sn); } + $this->Note_model->update_send_case($parent_txn_id, 'send'); return ; } diff --git a/webht/third_party/paypal/models/note_model.php b/webht/third_party/paypal/models/note_model.php index 973a918e..8ba5a906 100644 --- a/webht/third_party/paypal/models/note_model.php +++ b/webht/third_party/paypal/models/note_model.php @@ -213,6 +213,16 @@ class Note_model extends CI_Model { return $this->HT->query($sql, array($pn_send, $pn_txn_id)); } + public function update_send_case($pn_txn_id, $pn_send) { + $sql = " + UPDATE paypal_note + SET pn_send = ? + WHERE pn_txn_id = ? AND pn_payment_status='0' AND pn_send != 'send' + AND LEFT(CAST(pn_memo AS VARCHAR(100)), 22) = '{\"txn_type\":\"new_case\"' + "; + return $this->HT->query($sql, array($pn_send, $pn_txn_id)); + } + //设置订单号 public function set_invoice($pn_txn_id, $pn_invoice) { $sql = "