|
|
@@ -579,6 +579,7 @@ class PurchaseOrderController extends BaseController
|
|
|
$cgWhere['entryTime'] = ['between', [$currentStartTime, $currentEndTime]];
|
|
|
$cgList = PurchaseOrderClass::getAllByCondition($cgWhere, null, '*');
|
|
|
$list = [];
|
|
|
+ $totalAmount = 0;
|
|
|
if (!empty($cgList)) {
|
|
|
foreach ($cgList as $cgInfo) {
|
|
|
$actPrice = $cgInfo['actPrice'] ?? 0;
|
|
|
@@ -590,10 +591,11 @@ class PurchaseOrderController extends BaseController
|
|
|
$name = $ghsList[$ghsId] && $ghsList[$ghsId]['name'] ? $ghsList[$ghsId]['name'] : '未命名';
|
|
|
$list[$ghsId] = ['id' => $ghsId, 'name' => $name, 'amount' => $actPrice, 'num' => 1];
|
|
|
}
|
|
|
+ $totalAmount = bcadd($totalAmount, $actPrice, 2);
|
|
|
}
|
|
|
$list = array_values($list);
|
|
|
}
|
|
|
- util::success(['list' => $list]);
|
|
|
+ util::success(['list' => $list, 'totalAmount' => $totalAmount]);
|
|
|
}
|
|
|
|
|
|
}
|