|
|
@@ -152,6 +152,9 @@ class StatSaleClass extends BaseClass
|
|
|
if (!empty($ghsOrderList)) {
|
|
|
foreach ($ghsOrderList as $ghsKey => $ghsOrder) {
|
|
|
$actPrice = $ghsOrder['actPrice'] ?? 0;
|
|
|
+ if ($actPrice <= 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
$cost = $ghsOrder['remainCost'] ?? 0;
|
|
|
$profit = bcsub($actPrice, $cost, 2);
|
|
|
$orderPrice = $ghsOrder['orderPrice'] ?? 0;
|
|
|
@@ -159,6 +162,8 @@ class StatSaleClass extends BaseClass
|
|
|
$customId = $ghsOrder['customId'] ?? 0;
|
|
|
$status = $ghsOrder['status'] ?? 0;
|
|
|
$book = $ghsOrder['book'] ?? 0;
|
|
|
+ //扎数
|
|
|
+ $count = $ghsOrder['itemNum'] ?? 0;
|
|
|
if ($status == 1 || $status == 5) {
|
|
|
continue;
|
|
|
}
|
|
|
@@ -174,6 +179,7 @@ class StatSaleClass extends BaseClass
|
|
|
if (isset($arr[$customId])) {
|
|
|
$arr[$customId]['num']++;
|
|
|
$arr[$customId]['amount'] = bcadd($arr[$customId]['amount'], $actPrice, 2);
|
|
|
+ $arr[$customId]['count'] = bcadd($arr[$customId]['count'], $count, 2);
|
|
|
$arr[$customId]['orderPrice'] = bcadd($arr[$customId]['orderPrice'], $orderPrice, 2);
|
|
|
$arr[$customId]['tkPrice'] = bcadd($arr[$customId]['tkPrice'], $tkPrice, 2);
|
|
|
$arr[$customId]['cost'] = bcadd($arr[$customId]['cost'], $cost, 2);
|
|
|
@@ -184,6 +190,7 @@ class StatSaleClass extends BaseClass
|
|
|
'customName' => $customName,
|
|
|
'py' => $py,
|
|
|
'num' => 1,
|
|
|
+ 'count' => $count,
|
|
|
'amount' => $actPrice,
|
|
|
'levelName' => '',
|
|
|
'orderPrice' => $orderPrice,
|
|
|
@@ -1422,6 +1429,9 @@ class StatSaleClass extends BaseClass
|
|
|
if (!empty($ghsOrderList)) {
|
|
|
foreach ($ghsOrderList as $ghsOrder) {
|
|
|
$actPrice = $ghsOrder['actPrice'] ?? 0;
|
|
|
+ if ($actPrice <= 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
$cost = $ghsOrder['remainCost'] ?? 0;
|
|
|
$profit = bcsub($actPrice, $cost, 2);
|
|
|
$orderPrice = $ghsOrder['orderPrice'] ?? 0;
|
|
|
@@ -1429,6 +1439,8 @@ class StatSaleClass extends BaseClass
|
|
|
$customId = $ghsOrder['customId'] ?? 0;
|
|
|
$status = $ghsOrder['status'] ?? 0;
|
|
|
$book = $ghsOrder['book'] ?? 0;
|
|
|
+ //扎数
|
|
|
+ $count = $ghsOrder['itemNum'] ?? 0;
|
|
|
if ($status == 1 || $status == 5) {
|
|
|
continue;
|
|
|
}
|
|
|
@@ -1447,6 +1459,7 @@ class StatSaleClass extends BaseClass
|
|
|
$arr[$distId]['num']++;
|
|
|
$arr[$distId]['amount'] = bcadd($arr[$distId]['amount'], $actPrice, 2);
|
|
|
$arr[$distId]['orderPrice'] = bcadd($arr[$distId]['orderPrice'], $orderPrice, 2);
|
|
|
+ $arr[$distId]['count'] = bcadd($arr[$distId]['count'], $count, 2);
|
|
|
$arr[$distId]['tkPrice'] = bcadd($arr[$distId]['tkPrice'], $tkPrice, 2);
|
|
|
$arr[$distId]['cost'] = bcadd($arr[$distId]['cost'], $cost, 2);
|
|
|
$arr[$distId]['profit'] = bcadd($arr[$distId]['profit'], $profit, 2);
|
|
|
@@ -1455,6 +1468,7 @@ class StatSaleClass extends BaseClass
|
|
|
'distId' => $distId,
|
|
|
'distName' => $distName,
|
|
|
'num' => 1,
|
|
|
+ 'count' => $count,
|
|
|
'amount' => $actPrice,
|
|
|
'levelName' => '',
|
|
|
'orderPrice' => $orderPrice,
|