Commit 0931c971 authored by hujun's avatar hujun

退款

parent 5123ec99
...@@ -276,11 +276,12 @@ class DailyPaperService ...@@ -276,11 +276,12 @@ class DailyPaperService
); );
foreach ($info["agency_fee"] as $k=>$v) { foreach ($info["agency_fee"] as $k=>$v) {
$current_agent_name = $this->getBargainAgent($v['bargain_id']); $info["agency_fee"][$k]['current_agent_name'] = '';
if ($current_agent_name) { if ($v['bargain_id'] > 0) {
$info["agency_fee"][$k]['current_agent_name'] = $current_agent_name; $current_agent_name = $this->getBargainAgent($v['bargain_id']);
} else { if ($current_agent_name) {
$info["agency_fee"][$k]['current_agent_name'] = ''; $info["agency_fee"][$k]['current_agent_name'] = $current_agent_name;
}
} }
} }
...@@ -293,11 +294,12 @@ class DailyPaperService ...@@ -293,11 +294,12 @@ class DailyPaperService
$info["case_fee"] = $this->getHouseAndAgentInfo($new_case_fee_arr); $info["case_fee"] = $this->getHouseAndAgentInfo($new_case_fee_arr);
foreach ($info["case_fee"] as $k=>$v) { foreach ($info["case_fee"] as $k=>$v) {
$current_agent_name = $this->getBargainAgent($v['bargain_id']); $info["case_fee"][$k]['current_agent_name'] = '';
if ($current_agent_name) { if ($v['bargain_id'] > 0) {
$info["case_fee"][$k]['current_agent_name'] = $current_agent_name; $current_agent_name = $this->getBargainAgent($v['bargain_id']);
} else { if ($current_agent_name) {
$info["agency_fee"][$k]['current_agent_name'] = ''; $info["case_fee"][$k]['current_agent_name'] = $current_agent_name;
}
} }
} }
...@@ -313,8 +315,12 @@ class DailyPaperService ...@@ -313,8 +315,12 @@ class DailyPaperService
$m_report = new OReportModel(); $m_report = new OReportModel();
foreach ($info["earnest_money"] as $k=>$v) { foreach ($info["earnest_money"] as $k=>$v) {
$current_agent_name = $m_report->selectReportById('report_agent_name,report_store_id', ['id'=>$v['report_id']]); if ($v['report_id'] > 0) {
$info["earnest_money"][$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? "" : $current_agent_name[0]['report_agent_name']; $current_agent_name = $m_report->selectReportById('report_agent_name,report_store_id', ['id'=>$v['report_id']]);
$info["earnest_money"][$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? "" : $current_agent_name[0]['report_agent_name'];
} else {
$info['earnest_money'][$k]['current_agent_name'] = '';
}
} }
//保管金 //保管金
...@@ -323,8 +329,12 @@ class DailyPaperService ...@@ -323,8 +329,12 @@ class DailyPaperService
$payLogModel->selectPayLogListByBargainReport($field_money, $params) $payLogModel->selectPayLogListByBargainReport($field_money, $params)
); );
foreach ($info["custody_money"] as $k=>$v) { foreach ($info["custody_money"] as $k=>$v) {
$current_agent_name = $m_report->selectReportById('report_agent_name,report_store_id', ['id'=>$v['report_id']]); if ($v['report_id'] > 0) {
$info['custody_money'][$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? "" : $current_agent_name[0]['report_agent_name']; $current_agent_name = $m_report->selectReportById('report_agent_name,report_store_id', ['id'=>$v['report_id']]);
$info['custody_money'][$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? "" : $current_agent_name[0]['report_agent_name'];
} else {
$info['custody_money'][$k]['current_agent_name'] = '';
}
} }
//调整出账 //调整出账
...@@ -336,11 +346,6 @@ class DailyPaperService ...@@ -336,11 +346,6 @@ class DailyPaperService
$info["adjustment"] = $this->getHouseAndAgentInfo( $info["adjustment"] = $this->getHouseAndAgentInfo(
$payLogModel->selectAdjustmentList($field_adjustment, $params_adjustment) $payLogModel->selectAdjustmentList($field_adjustment, $params_adjustment)
); );
foreach ($info["adjustment"] as $k=>$v) {
$current_agent_name = $m_report->selectReportById('report_agent_name,report_store_id', ['id'=>$v['report_id']]);
$info['adjustment'][$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? "" : $current_agent_name[0]['report_agent_name'];
}
return $info; return $info;
} }
......
...@@ -639,7 +639,7 @@ class OrderLogService ...@@ -639,7 +639,7 @@ class OrderLogService
$field_refund = "a.id,a.report_id,a.agent_id,a.agent_name,a.order_no,a.order_id,a.refund_money,a.status,a.name $field_refund = "a.id,a.report_id,a.agent_id,a.agent_name,a.order_no,a.order_id,a.refund_money,a.status,a.name
,a.phone,a.bank,a.card_no, a.remark,a.receipt_number,a.type,a.refund_cause,a.pay_log_id,a.refund_way, ,a.phone,a.bank,a.card_no, a.remark,a.receipt_number,a.type,a.refund_cause,a.pay_log_id,a.refund_way,
a.create_time,b.income_time"; a.create_time,b.income_time";
$refundData = $oRefundModel->selectRefundDetailByOrderNo($field_refund, ["order_id" => $order_id, 'is_del'=>0]); $refundData = $oRefundModel->selectRefundDetailByOrderNo($field_refund, ["order_id" => $order_id, 'del'=>0]);
if (count($refundData) > 0) { if (count($refundData) > 0) {
foreach ($refundData as $k => $v) { foreach ($refundData as $k => $v) {
$v["step_name"] = "refund"; $v["step_name"] = "refund";
......
...@@ -120,6 +120,9 @@ class ORefundModel extends Model{ ...@@ -120,6 +120,9 @@ class ORefundModel extends Model{
if (isset($params["id"])) { if (isset($params["id"])) {
$where_["a.id"] = $params["id"]; $where_["a.id"] = $params["id"];
} }
if (isset($params["del"])) {
$where_["a.is_del"] = $params["del"];
}
return $this->db_ return $this->db_
->field($filed) ->field($filed)
......
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