|
|
@ -33,7 +33,7 @@ class Paypal_model extends CI_Model {
|
|
|
|
order by CHARINDEX('$COLI_ID', COLI_ID) ";
|
|
|
|
order by CHARINDEX('$COLI_ID', COLI_ID) ";
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
$result = $query->result();
|
|
|
|
$result = $query->result();
|
|
|
|
if ($handpick === TRUE) {
|
|
|
|
if ($handpick === TRUE && count($result) > 0) {
|
|
|
|
$result = array($result[0]);
|
|
|
|
$result = array($result[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -598,22 +598,25 @@ class Paypal_model extends CI_Model {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//根据交易号获取收款记录(传统订单)
|
|
|
|
//根据交易号获取收款记录(传统订单)
|
|
|
|
public function get_money_t($pn_invoice) {
|
|
|
|
public function get_money_t($pn_invoice) {
|
|
|
|
$sql = "SELECT GroupAccountInfo.*
|
|
|
|
$sql = "SELECT cli.COLI_ID, gai.*
|
|
|
|
from GroupAccountInfo
|
|
|
|
from GroupAccountInfo gai
|
|
|
|
where DeleteFlag=0 and GAI_AccreditNo=?
|
|
|
|
LEFT JOIN ConfirmLineInfo AS cli ON cli.COLI_SN =GAI_COLI_SN
|
|
|
|
|
|
|
|
where gai.DeleteFlag=0 and gai.GAI_AccreditNo=?
|
|
|
|
";
|
|
|
|
";
|
|
|
|
$query = $this->HT->query($sql, array($pn_invoice));
|
|
|
|
$query = $this->HT->query($sql, array($pn_invoice));
|
|
|
|
|
|
|
|
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . PHP_EOL . var_export($this->HT->last_query(), 1));
|
|
|
|
$result = $query->result();
|
|
|
|
$result = $query->result();
|
|
|
|
return $result;
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//根据交易号获取收款记录(商务订单)
|
|
|
|
//根据交易号获取收款记录(商务订单)
|
|
|
|
public function get_money_b($pn_invoice, $find_memo = true) {
|
|
|
|
public function get_money_b($pn_invoice, $find_memo = true) {
|
|
|
|
$find_memo_sql = $find_memo === true ? " OR GAI_Memo='$pn_invoice' " : "";
|
|
|
|
$find_memo_sql = $find_memo === true ? " OR GAI_Memo='$pn_invoice' " : "";
|
|
|
|
$sql = "SELECT BIZ_GroupAccountInfo.*
|
|
|
|
$sql = "SELECT GAI_COLI_ID AS COLI_ID, BIZ_GroupAccountInfo.*
|
|
|
|
from BIZ_GroupAccountInfo
|
|
|
|
from BIZ_GroupAccountInfo
|
|
|
|
where DeleteFlag=0 and ( GAI_AccreditNo=? $find_memo_sql )
|
|
|
|
where DeleteFlag=0 and ( GAI_AccreditNo=? $find_memo_sql )
|
|
|
|
";
|
|
|
|
";
|
|
|
|
$query = $this->HT->query($sql, array($pn_invoice));
|
|
|
|
$query = $this->HT->query($sql, array($pn_invoice));
|
|
|
|
|
|
|
|
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . PHP_EOL . var_export($this->HT->last_query(), 1));
|
|
|
|
$result = $query->result();
|
|
|
|
$result = $query->result();
|
|
|
|
return $result;
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|