|
|
@@ -16,10 +16,7 @@ class StatKdController extends BaseController
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
$where = [];
|
|
|
- $where['shopId'] = $this->shopId;
|
|
|
- if (isset($get['shopId']) && !empty($get['shopId'])) {
|
|
|
- $where['shopId'] = $get['shopId'];
|
|
|
- }
|
|
|
+ $where['mainId'] = $this->mainId;
|
|
|
$searchTime = $get['searchTime'] ?? 'today';
|
|
|
if (!empty($searchTime)) {
|
|
|
$startTime = $get['startTime'] ?? '';
|
|
|
@@ -28,7 +25,6 @@ class StatKdController extends BaseController
|
|
|
$where['time'] = ['between', [$period['startTime'], $period['endTime']]];
|
|
|
}
|
|
|
$kdList = StatKdClass::getAllByCondition($where, null, '*');
|
|
|
-
|
|
|
$kd = ['wx' => 0, 'alipay' => 0, 'balance' => 0, 'cash' => 0, 'bank' => 0, 'debt' => 0, 'amount' => 0];
|
|
|
if (!empty($kdList)) {
|
|
|
foreach ($kdList as $key => $item) {
|
|
|
@@ -41,7 +37,6 @@ class StatKdController extends BaseController
|
|
|
$kd['amount'] = bcadd($kd['amount'], $item['amount']);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
$refund = ['wx' => 0, 'alipay' => 0, 'balance' => 0, 'cash' => 0, 'bank' => 0, 'debt' => 0, 'amount' => 0];
|
|
|
$refundList = StatRefundClass::getAllByCondition($where, null, '*');
|
|
|
if (!empty($refundList)) {
|