md
This commit is contained in:
parent
670af37ed4
commit
1c6f4ee3ba
@ -655,7 +655,10 @@
|
||||
sum(if( tbMA.settleType=2,1, 0 ) ) AS totalMonthBillCount,
|
||||
sum(if( tbMA.settleType=2,tbMA.recMoney, 0 ) ) AS totalMonthRecAmount,
|
||||
sum(if( tbMA.settleType=2,tbMA.recdMoneyIn, 0 ) ) AS totalMonthRecdIn,
|
||||
sum(if( tbMA.settleType=2,tbMA.recdPayMoney60D, 0 ) ) AS totalMonthRecd70
|
||||
sum(if( tbMA.settleType=2,tbMA.recdPayMoney60D, 0 ) ) AS totalMonthRecd70,
|
||||
|
||||
ifnull(ecp.money,0) as moneyProfit,
|
||||
ifnull(ecp.month_money,0) as monthProfit
|
||||
|
||||
from (
|
||||
SELECT
|
||||
@ -879,7 +882,7 @@
|
||||
</where>
|
||||
GROUP BY a.settle_bill_no
|
||||
) tbc ON tba.settle_bill_no = tbc.settle_bill_no
|
||||
) tbMA
|
||||
) tbMA left join emis_commission_profit ecp on tbMA.salesmen=ecp.emp_name and tbMA.billMonth = ecp.bill_month
|
||||
group by tbMA.salesmen,tbMA.billMonth
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user