修改时间查询
This commit is contained in:
parent
189c872815
commit
305707d179
@ -563,10 +563,24 @@ class WorkbenchLogic extends BaseLogic
|
|||||||
|
|
||||||
//总的营业额的统计 总的利润的统计 总的成本合集的统计 总的加到保证金的
|
//总的营业额的统计 总的利润的统计 总的成本合集的统计 总的加到保证金的
|
||||||
$all = StoreOrder::where(['paid'=>YesNoEnum::YES,'store_id'=>$params['store_id']]);
|
$all = StoreOrder::where(['paid'=>YesNoEnum::YES,'store_id'=>$params['store_id']]);
|
||||||
|
|
||||||
|
$deposit_all = SystemStore::where('id',$params['store_id'])
|
||||||
|
->value('paid_deposit');
|
||||||
|
|
||||||
|
$cash_all = StoreCashFinanceFlow::where('store_id',$params['store_id'])
|
||||||
|
->where('status',YesNoEnum::YES)
|
||||||
|
->sum('receipts');
|
||||||
if(isset($params['month']) && $params['month']){
|
if(isset($params['month']) && $params['month']){
|
||||||
$all = StoreOrder::where(['paid'=>YesNoEnum::YES,'store_id'=>$params['store_id']])
|
$all = StoreOrder::where(['paid'=>YesNoEnum::YES,'store_id'=>$params['store_id']])
|
||||||
->whereMonth('create_time', $params['month'])
|
->whereMonth('create_time', $params['month'])
|
||||||
;
|
;
|
||||||
|
$deposit_all = SystemStore::where('id',$params['store_id'])
|
||||||
|
->whereMonth('create_time', $params['month'])
|
||||||
|
->value('paid_deposit');
|
||||||
|
$cash_all = StoreCashFinanceFlow::where('store_id',$params['store_id'])
|
||||||
|
->where('status',YesNoEnum::YES)
|
||||||
|
->whereMonth('create_time', $params['month'])
|
||||||
|
->sum('receipts');
|
||||||
}
|
}
|
||||||
$turnover_all = $all
|
$turnover_all = $all
|
||||||
->sum('pay_price');
|
->sum('pay_price');
|
||||||
@ -574,11 +588,8 @@ class WorkbenchLogic extends BaseLogic
|
|||||||
->sum('profit');
|
->sum('profit');
|
||||||
$cost_all = $all
|
$cost_all = $all
|
||||||
->sum('cost');
|
->sum('cost');
|
||||||
$deposit_all = SystemStore::where('id',$params['store_id'])
|
|
||||||
->value('paid_deposit');
|
|
||||||
$cash_all = StoreCashFinanceFlow::where('store_id',$params['store_id'])
|
|
||||||
->where('status',YesNoEnum::YES)
|
|
||||||
->sum('receipts');
|
|
||||||
|
|
||||||
|
|
||||||
$time = self::getLastSevenDays();
|
$time = self::getLastSevenDays();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user