PayPal导出不含WH记录

hotfix/远程访问多媒体中心
lyt 6 years ago
parent 8f9888e609
commit e065c87dcb

@ -1316,7 +1316,7 @@ class Index extends CI_Controller {
$amount = $this->input->post("set_amount");
$last_record = $this->input->post("date_history");
if (empty($amount)) {
$export_list = $this->Note_model->date_range($from_date, $to_date, $currency);
$export_list = $this->Note_model->date_range($from_date, $to_date, $currency, null, false);
} else {
$allmost_day = intval(ceil($amount/10000));
if ( ! in_array($currency, array('CNY','USD'))) {
@ -1382,7 +1382,7 @@ class Index extends CI_Controller {
public function target_amount_recursive($currency, $target_amount, $now_amount, $from_date,$days=10,$list=array(), $last_sn=null, $last_flag=null)
{
$to_date = date('Y-m-d', strtotime("+$days days", strtotime($from_date)));
$former_list = $this->Note_model->date_range($from_date, $to_date, $currency, $last_sn);
$former_list = $this->Note_model->date_range($from_date, $to_date, $currency, $last_sn, false);
$list_index = 0;
$last_sn = $last_sn===null ? 0 : $last_sn;
$last_flag = $last_flag===null ? null : $last_flag;

@ -155,7 +155,7 @@ class Note_model extends CI_Model {
return $this->HT->query($sql, array($pn_invoice, $pn_txn_id));
}
public function date_range($from, $to, $currency=NULL, $pn_sn=NULL)
public function date_range($from, $to, $currency=NULL, $pn_sn=NULL, $includeWH=true)
{
$this->init();
$search_sql = " AND pn_payment_status in ('Completed','Refunded') ";
@ -166,6 +166,9 @@ class Note_model extends CI_Model {
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();

Loading…
Cancel
Save