Commit 1b3d3db5 authored by hujun's avatar hujun

退款

parent 57b1f1e6
......@@ -185,12 +185,18 @@ class DailyPaperService
case 11:
$total["alipay_2"] = $item["money"];
break;
case 12:
$total["alipay"] = $item["money"];
break;
case 20:
$total["tenpay"] = $item["money"];
break;
case 21:
$total["tenpay_2"] = $item["money"];
break;
case 22:
$total["tenpay"] = $item["money"];
break;
case 30:
$total["pos"] = $item["money"];
break;
......
......@@ -79,14 +79,24 @@ class DailyPaper extends Basic
"pos" => "777",//pos机
"other_bank" => "888"//其他
);*/
if (empty($params["agent_id"]) || empty($params["agent_name"]) || empty($params["daily_date"]) ||
!isset($params["alipay"]) || !isset($params["tenpay"]) || !isset($params["realty_pay"]) ||
!isset($params["family_pay"]) || !isset($params["private_bank"]) || !isset($params["cash"]) ||
!isset($params["pos"]) || !isset($params["other_bank"])
) {
return $this->response("101", "请求参数错误");
if ($this->siteId == 10001) {
if (empty($params["agent_id"]) || empty($params["agent_name"]) || empty($params["daily_date"]) ||
!isset($params["alipay"]) || !isset($params["tenpay"]) || !isset($params["realty_pay"]) ||
!isset($params["family_pay"]) || !isset($params["private_bank"]) || !isset($params["cash"]) ||
!isset($params["pos"]) || !isset($params["other_bank"])
) {
return $this->response("101", "请求参数错误");
}
} else {
if (empty($params["agent_id"]) || empty($params["agent_name"]) || empty($params["daily_date"]) ||
!isset($params["alipay"]) || !isset($params["tenpay"]) || !isset($params['bank_card'])
) {
return $this->response("101", "请求参数错误");
}
}
$agent_id = $params["agent_id"];
$agent_name = $params["agent_name"];
$daily_date = $params["daily_date"];
......
......@@ -2609,6 +2609,7 @@ class Finance extends Basic
$m_report = new OReportModel();
$m_agent_house = new GHousesToAgents();
$m_house = new GHouses();
$m_refund = new ORefundLogModel();
foreach ($list as $k=>$v) {
if ($v['source'] == 2) {
$source_id = $m_pay_adjustment->getFieldColumn('id', ['new_paylog_id'=> $v['id']]);
......@@ -2617,6 +2618,13 @@ class Finance extends Basic
$list[$k]['source_id'] = '';
}
$num = $m_refund->getTotal(['order_id'=>$v['order_id'],'is_del'=>0]);
if ($num > 0) {
$list[$k]['is_refund'] = 1;
} else {
$list[$k]['is_refund'] = 0;
}
if ($v['type'] != 10 && $v['type'] != 30) {
$bargain_data = $this->m_bargain->getDetail('id,father_id', ['order_id'=>$v['order_id']]);
$bargain_id = $bargain_data['id'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment