Commit b1476057 authored by hujun's avatar hujun

money

parent 3523689b
......@@ -295,7 +295,7 @@ class OfficeBargain extends Basic
if ($is_show) {
$data['data']['total_commission'] = $this->m_bargain->getBargainListSum('commission', $where);
$data['data']['total_income_money'] = $m_real->getIncomeListSum('e.money', $where);
$data['data']['total_income_money'] = $m_real->getIncomeListSum('g.money', $where);
} else {
$data['data']['total_commission'] = 0;
$data['data']['total_income_money'] = 0;
......
......@@ -115,7 +115,8 @@ class OfficeORealIncome extends BaseModel
*/
public function getIncomeListSum($field = '', $params = '')
{
return $this->alias('e')
return $this->field($field)->alias('g')
->join('office_o_bargain a', 'g.bargain_id = a.id','left')
->join('office_o_report b', 'a.report_id = b.id', 'left')
->join('office_o_order c', 'a.order_id = c.id', 'left')
->join('office_g_room d', 'c.house_id = d.id', 'left')
......
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