|
|
@@ -21,12 +21,12 @@ class ConsoleController extends BaseController
|
|
|
$todayDate = date('Y-m-d');
|
|
|
$todayStartTime = $todayDate . ' 00:00:00';
|
|
|
$todayEndTime = $todayDate . ' 23:59:59';
|
|
|
- $where = ['shopId' => $this->shopId, 'debt' => 0];
|
|
|
+ $where = ['shopId' => $this->shopId, 'debt' => 0, 'payStatus' => 2];
|
|
|
$where['addTime'] = ['between', [$todayStartTime, $todayEndTime]];
|
|
|
$todayActIncome = OrderClass::sum($where, 'actPrice'); // 今日实收
|
|
|
$todayActIncome = $todayActIncome === null ? 0 : $todayActIncome;
|
|
|
|
|
|
- $where = ['shopId' => $this->shopId, 'debt' => 1]; // 重新赋值
|
|
|
+ $where = ['shopId' => $this->shopId, 'debt' => 1]; // 查询条件重新赋值
|
|
|
$where['addTime'] = ['between', [$todayStartTime, $todayEndTime]];
|
|
|
$todayDebt = OrderClass::sum($where, 'debtPrice'); // 今日欠款
|
|
|
$todayDebt = $todayDebt === null ? 0 : $todayDebt;
|