perf: PayPal多账户: +Trippest 显示收款的账户

master
Lei OT 2 years ago
parent 0d8971f8ed
commit 70083f1de5

@ -1307,6 +1307,19 @@ class Index extends CI_Controller {
$this->load->view('n-footer');
}
/**
* 按账户查找
* @author LYT
*/
public function note_account_list($status) {
$this->permission->is_admin(true);
$data = array();
$data['notelist'] = $this->Note_model->noteaccount(200, $status);
$this->load->view('n-header', $data);
$this->load->view('note_list');
$this->load->view('n-footer');
}
//获取note详情修改各项数据
public function note_modal($pn_txn_id, $pn_id=false, $pn_invoice=false) {
$this->permission->is_admin(true);

@ -66,6 +66,15 @@ class Note_model extends CI_Model {
return $this->get_list();
}
public function noteaccount($topnum = 2, $account = '') {
$this->init();
$this->topnum = $topnum;
$x_str = strtolower($account);
$sql4 = " AND (pn_memo like '%\"business\":\"$x_str\"%') ";
$this->pn_send = $sql4;
return $this->get_list();
}
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','')) ";
@ -155,7 +164,27 @@ class Note_model extends CI_Model {
return FALSE;
}
} else {
return $query->result();
$result = $query->result();
array_walk($result, 'note_model::set_fundsource');
return $result;
}
}
private $code_fundsource = array(
"pay@trippest.com" => "Trippest", // business":"pay@trippest.com"
"pays@chinahighlights.com" => "", // "CHT",
"paypal@chinahighlights.com" => "2", // "CHT",
"0" => "unknown",
);
public function set_fundsource(&$ele)
{
$ele->fundsource = "";
$raw = json_decode($ele->pn_memo);
$business = isset($raw->business) ? $raw->business : '0';
if ($this->code_fundsource[$business]) {
$ele->fundsource = $this->code_fundsource[$business];
}
if ( ! isset($raw->ipn_track_id) && (isset($raw->id) && strpos($raw->id, "WH-") === 0)) {
$ele->fundsource = '';
}
}

@ -49,6 +49,13 @@
.trigger_export_btn{position: absolute;top: 0;left: 17%;}
.modal-dialog{max-width: 1024px;}
</style>
<style>
.brand_text {color: #fff; padding: 2px 3px; border-radius: 4px;font-style: italic;}
.webhooks-color{background-color: dimgrey; }
.unknown-color{background-color: dimgray; }
.cht-color {background-color: #A31022;}
.trippest-color {background-color: #E83201;}
</style>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary trigger_export_btn hidden-xs" data-toggle="modal" data-target="#exampleModal">
导出收款记录 &gt;
@ -210,6 +217,9 @@ echo "<option value=\"$vf->TEL_SN@" . strstr($vf->TEL_transactionDate, " ", true
<li class="col-sm-1 nopadding-L" style="overflow:hidden;word-break: break-all;height: 25px;"><?php echo ($key + 1); ?></li>
<li class="col-sm-7 nopadding-L" style="overflow:hidden;word-break: break-all;height: 25px;">
<span class="brand_text <?php echo strtolower(str_replace(" ","",$item->fundsource))."-color"; ?>"><?php echo $item->fundsource; ?></span>
<a class="seen" target="_blank" href="<?php echo site_url('apps/paypal/index/detail_ht/' . $item->pn_txn_id); ?>">
<?php echo htmlentities($item->pn_invoice) . ' / ' . $item->pn_mc_gross . $item->pn_mc_currency . ' / ' . $item->pn_payer; ?>
</a></li>

Loading…
Cancel
Save