|
|
@@ -22,6 +22,13 @@ class ConsoleController extends BaseController
|
|
|
//总览
|
|
|
public function actionStat()
|
|
|
{
|
|
|
+ $where = ['shopId' => $this->shopId, 'debt' => 1]; // 重新赋值
|
|
|
+ $pfDebt = OrderClass::sum($where, 'remainDebtPrice'); // 总欠款
|
|
|
+ $pfDebt = $pfDebt === null ? 0 : $pfDebt;
|
|
|
+ $lsDebt = \bizHd\order\classes\OrderClass::sum(['mainId' => $this->mainId, 'debt' => 1], 'remainDebtPrice');
|
|
|
+ $lsDebt = $lsDebt === null ? 0 : $lsDebt;
|
|
|
+ $totalDebt = bcadd($pfDebt, $lsDebt, 2);
|
|
|
+
|
|
|
$itemList = ItemClass::getAllByCondition(['mainId' => $this->mainId], null, 'id,stock,cost,virtualStock,delStatus', null, true);
|
|
|
$totalItemNum = 0;
|
|
|
$totalCost = 0;
|