|
@@ -68,9 +68,6 @@ class StatItemController extends BaseController
|
|
|
$where['payTime'] = ['between', [$currentStartTime, $currentEndTime]];
|
|
$where['payTime'] = ['between', [$currentStartTime, $currentEndTime]];
|
|
|
|
|
|
|
|
$staffId = $get['staffId'] ?? 0;
|
|
$staffId = $get['staffId'] ?? 0;
|
|
|
- if (!empty($staffId)) {
|
|
|
|
|
- $where['cgStaffId'] = $staffId;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
$list = OrderClass::getAllByCondition($where, null, '*');
|
|
$list = OrderClass::getAllByCondition($where, null, '*');
|
|
|
if (empty($list)) {
|
|
if (empty($list)) {
|
|
@@ -95,6 +92,13 @@ class StatItemController extends BaseController
|
|
|
$name = $productInfo[$productId]['name'] ?? '';
|
|
$name = $productInfo[$productId]['name'] ?? '';
|
|
|
$py = $productInfo[$productId]['py'] ?? '';
|
|
$py = $productInfo[$productId]['py'] ?? '';
|
|
|
|
|
|
|
|
|
|
+ if (!empty($staffId)) {
|
|
|
|
|
+ $currentCgStaffId = $productInfo[$productId]['cgStaffId'] ?? 0;
|
|
|
|
|
+ if ($staffId != $currentCgStaffId) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$num = bcsub($item['xhNum'], $item['refundNum'], 2);
|
|
$num = bcsub($item['xhNum'], $item['refundNum'], 2);
|
|
|
$unitPrice = $item['xhUnitPrice'] ?? 0;
|
|
$unitPrice = $item['xhUnitPrice'] ?? 0;
|
|
|
$unitCost = $item['cost'] ?? 0;
|
|
$unitCost = $item['cost'] ?? 0;
|