|
|
@@ -13,7 +13,7 @@ use bizGhs\order\classes\OrderItemClass;
|
|
|
use bizGhs\order\classes\PurchaseOrderClass;
|
|
|
use bizGhs\order\classes\PurchaseOrderItemClass;
|
|
|
use bizGhs\order\classes\RefundOrderClass;
|
|
|
-use bizGhs\order\services\NextDayRefundService;
|
|
|
+use bizGhs\order\classes\NextDayRefundClass;
|
|
|
use bizGhs\order\classes\StockWastageOrderClass;
|
|
|
use bizGhs\product\classes\ProductClass;
|
|
|
use bizGhs\staff\classes\SalaryClass;
|
|
|
@@ -202,7 +202,7 @@ class StatSaleClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
// 隔天售后扣客户采购金额(笔数不减)
|
|
|
- $fwdMap = NextDayRefundService::sumAmountGroupByCustom($mainId, $currentStartTime, $currentEndTime);
|
|
|
+ $fwdMap = NextDayRefundClass::sumAmountGroupByCustom($mainId, $currentStartTime, $currentEndTime);
|
|
|
foreach ($fwdMap as $cid => $amt) {
|
|
|
if (!isset($arr[$cid])) {
|
|
|
continue;
|
|
|
@@ -332,7 +332,7 @@ class StatSaleClass extends BaseClass
|
|
|
// 隔天售后扣减批发收入(笔数不变)
|
|
|
$pfIncome = bcsub(
|
|
|
(string)$pfIncome,
|
|
|
- NextDayRefundService::sumAmountByMainAndTime($mainId, $currentStartTime, $currentEndTime),
|
|
|
+ NextDayRefundClass::sumAmountByMainAndTime($mainId, $currentStartTime, $currentEndTime),
|
|
|
2
|
|
|
);
|
|
|
|
|
|
@@ -586,7 +586,7 @@ class StatSaleClass extends BaseClass
|
|
|
$productId = $orderItem->productId ?? 0;
|
|
|
$num = $orderItem->xhNum ?? 0;
|
|
|
// 支付日净销量:当天已退=refundNum-nextRefundNum
|
|
|
- $remainNum = NextDayRefundService::payDayRemainNum(
|
|
|
+ $remainNum = NextDayRefundClass::payDayRemainNum(
|
|
|
$num,
|
|
|
$refundNum,
|
|
|
$orderItem->nextRefundNum ?? 0
|
|
|
@@ -934,7 +934,7 @@ class StatSaleClass extends BaseClass
|
|
|
$name = $orderItem->name ?? '';
|
|
|
$productId = $orderItem->productId ?? 0;
|
|
|
$num = $orderItem->xhNum ?? 0;
|
|
|
- $remainNum = NextDayRefundService::payDayRemainNum(
|
|
|
+ $remainNum = NextDayRefundClass::payDayRemainNum(
|
|
|
$num,
|
|
|
$refundNum,
|
|
|
$orderItem->nextRefundNum ?? 0
|
|
|
@@ -1018,12 +1018,12 @@ class StatSaleClass extends BaseClass
|
|
|
}
|
|
|
};
|
|
|
$applyClassDelta(
|
|
|
- NextDayRefundService::sumItemByProduct($mainId, $currentStartTime, $currentEndTime),
|
|
|
+ NextDayRefundClass::sumItemByProduct($mainId, $currentStartTime, $currentEndTime),
|
|
|
-1
|
|
|
);
|
|
|
$onlyRefund = bcadd(
|
|
|
(string)$onlyRefund,
|
|
|
- NextDayRefundService::sumMoneyOnlyAmountByMainAndTime($mainId, $currentStartTime, $currentEndTime),
|
|
|
+ NextDayRefundClass::sumMoneyOnlyAmountByMainAndTime($mainId, $currentStartTime, $currentEndTime),
|
|
|
2
|
|
|
);
|
|
|
|
|
|
@@ -1462,7 +1462,7 @@ class StatSaleClass extends BaseClass
|
|
|
$orderItemList = OrderItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*', null, true);
|
|
|
if (!empty($orderItemList)) {
|
|
|
foreach ($orderItemList as $orderItem) {
|
|
|
- $remainNum = NextDayRefundService::payDayRemainNum(
|
|
|
+ $remainNum = NextDayRefundClass::payDayRemainNum(
|
|
|
$orderItem->xhNum ?? 0,
|
|
|
$orderItem->refundNum ?? 0,
|
|
|
$orderItem->nextRefundNum ?? 0
|
|
|
@@ -1571,7 +1571,7 @@ class StatSaleClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
// 隔天售后按客户扣金额后归到片区(笔数不减;无当日开单的片区不新建行)
|
|
|
- $fwdMap = NextDayRefundService::sumAmountGroupByCustom($mainId, $currentStartTime, $currentEndTime);
|
|
|
+ $fwdMap = NextDayRefundClass::sumAmountGroupByCustom($mainId, $currentStartTime, $currentEndTime);
|
|
|
foreach ($fwdMap as $cid => $amt) {
|
|
|
$distId = $customList[$cid]['distId'] ?? 0;
|
|
|
if (!isset($arr[$distId])) {
|
|
|
@@ -1639,11 +1639,11 @@ class StatSaleClass extends BaseClass
|
|
|
|
|
|
// 通过日:扣退货数量+金额
|
|
|
$applyDelta(
|
|
|
- NextDayRefundService::sumItemByProduct($mainId, $startTime, $endTime),
|
|
|
+ NextDayRefundClass::sumItemByProduct($mainId, $startTime, $endTime),
|
|
|
-1
|
|
|
);
|
|
|
|
|
|
- return NextDayRefundService::sumMoneyOnlyAmountByMainAndTime($mainId, $startTime, $endTime);
|
|
|
+ return NextDayRefundClass::sumMoneyOnlyAmountByMainAndTime($mainId, $startTime, $endTime);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1674,12 +1674,12 @@ class StatSaleClass extends BaseClass
|
|
|
};
|
|
|
|
|
|
$applyDelta(
|
|
|
- NextDayRefundService::sumItemBySendStaff($mainId, $startTime, $endTime),
|
|
|
+ NextDayRefundClass::sumItemBySendStaff($mainId, $startTime, $endTime),
|
|
|
-1
|
|
|
);
|
|
|
// 仅退款只减金额
|
|
|
$applyDelta(
|
|
|
- NextDayRefundService::sumMoneyOnlyAmountBySendStaff($mainId, $startTime, $endTime),
|
|
|
+ NextDayRefundClass::sumMoneyOnlyAmountBySendStaff($mainId, $startTime, $endTime),
|
|
|
-1
|
|
|
);
|
|
|
}
|