|
|
@@ -46,12 +46,15 @@ class ConsoleController extends BaseController
|
|
|
}
|
|
|
$totalItemNum = floor($totalItemNum);
|
|
|
$totalBalance = CustomClass::sum(['ownMainId'=>$this->mainId],'balance');
|
|
|
- $totalBalance = abs($totalBalance);
|
|
|
+ $balance = 0;
|
|
|
+ if($totalDebt>abs($totalBalance)) {
|
|
|
+ $balance = bcsub($totalDebt, $totalBalance, 2);
|
|
|
+ }
|
|
|
$overview = [
|
|
|
['name' => "库存数", "url" => '/admin/stat/stock', 'value' => $totalItemNum, 'type' => 1],
|
|
|
['name' => "库存值", "url" => '/admin/stat/stock', 'value' => $totalCost, 'type' => 1],
|
|
|
- ['name' => "实际应收", "url" => '/admin/shop/debtChange', 'value' => $totalDebt, 'type' => 1],
|
|
|
- ['name' => "应收款", "url" => '/admin/home/member', 'value' => $totalBalance, 'type' => 4],
|
|
|
+ ['name' => "应收款", "url" => '/admin/shop/debtChange', 'value' => $totalDebt, 'type' => 1],
|
|
|
+ ['name' => "客户存款", "url" => '/admin/home/member', 'value' => $balance, 'type' => 4],
|
|
|
['name' => "总访客", "url" => '/admin/home/member', 'value' => 0, 'type' => 4],
|
|
|
['name' => "总订单", "url" => '/admin/home/order', 'value' => 0, 'type' => 4],
|
|
|
];
|