Commit c3352408 authored by hujun's avatar hujun

退款

parent 40e9a43b
......@@ -2985,6 +2985,14 @@ class Finance extends Basic
$source_id = $m_pay_adjustment->getFieldColumn('id', ['paylog_id'=> $pay_data['id']]);
$pay_data['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
$m_refund = new ORefundModel();
$num = $m_refund->getFind('id',['pay_log_id'=>$pay_data['id'],'is_del'=>0]);
if ($num['id'] > 0) {
$pay_data['is_refund'] = 1;
} else {
$pay_data['is_refund'] = 0;
}
$m_agent_house = new GHousesToAgents();
$m_store = new AStore();
$m_report = new OReportModel();
......@@ -4028,7 +4036,8 @@ class Finance extends Basic
$list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
} else {
$source_id = $m_pay_adjustment->getFieldColumn('id', ['paylog_id'=> $v['id']]);
$list[$k]['is_adjustment'] = empty($source_id) ? 0 : implode(',', $source_id);
$list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
$list[$k]['is_adjustment'] = $source_id ? 1 : 0;
}
$num = $m_refund->getFind('id',['pay_log_id'=>$v['id'],'is_del'=>0]);
......
......@@ -1353,6 +1353,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
doc.find("#fenhong").val(data.is_dividend);
doc.find('#pinpai').text(data.industry_type);
var source_id = data.source_id ;
var is_refund = data.is_refund ;
if (data.source == 0) {
$("#comes").text('APP');
// doc.find("#status").text("正常");
......@@ -1378,9 +1379,13 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$("#payType").attr("disabled","disabled").css("background-color","#EEEEEE;");
$('#payNo').attr("readonly" , "readonly");
}
if ( source_id ) {
doc.find("#status").text("被调整");
} else {
if ( source_id && is_refund) {
doc.find("#status").text("被调整+被退款");
} else if (source_id){
doc.find("#status").text("被调整");
} else if (is_refund){
doc.find("#status").text("被退款");
} else {
doc.find("#status").text("正常");
}
// doc.find("#status").text(data.source_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