|
|
|
@ -175,6 +175,24 @@ class Note_model extends CI_Model {
|
|
|
|
|
$this->orderby = " order by pn.pn_sn asc";
|
|
|
|
|
return $this->get_list();
|
|
|
|
|
}
|
|
|
|
|
public function top_list($top, $currency=NULL, $pn_sn=NULL, $includeWH=true)
|
|
|
|
|
{
|
|
|
|
|
$this->init();
|
|
|
|
|
$this->topnum = $top;
|
|
|
|
|
$search_sql = " AND pn_payment_status in ('Completed','Refunded') ";
|
|
|
|
|
if ( ! empty($currency)) {
|
|
|
|
|
$search_sql .= " AND pn_mc_currency = '$currency' ";
|
|
|
|
|
}
|
|
|
|
|
if ( ! empty($pn_sn)) {
|
|
|
|
|
$search_sql .= " AND pn_sn >= $pn_sn ";
|
|
|
|
|
}
|
|
|
|
|
if (true !== $includeWH) {
|
|
|
|
|
$search_sql .= " AND isnull(pn_payer,'')<>'' and ISNULL(pn_payer_email,'')<>'' ";
|
|
|
|
|
}
|
|
|
|
|
$this->search = $search_sql;
|
|
|
|
|
$this->orderby = " order by pn.pn_sn asc";
|
|
|
|
|
return $this->get_list();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|