|
|
@@ -7,6 +7,7 @@ use bizGhs\custom\classes\CustomDebtChangeClass;
|
|
|
use bizGhs\express\services\DadaExpressServices;
|
|
|
use bizGhs\ghs\classes\GhsClass;
|
|
|
use bizGhs\order\classes\OrderItemClass;
|
|
|
+use bizGhs\order\classes\RefundOrderClass;
|
|
|
use bizHd\purchase\classes\PurchaseClass;
|
|
|
use bizHd\purchase\services\PurchaseService;
|
|
|
use bizHd\wx\classes\WxOpenClass;
|
|
|
@@ -2254,6 +2255,10 @@ class OrderController extends BaseController
|
|
|
$totalPack = 0;
|
|
|
$totalFreight = 0;
|
|
|
$totalTkPrice = 0;
|
|
|
+
|
|
|
+ //增加项
|
|
|
+ $totalOnlyTkPrice = 0;
|
|
|
+
|
|
|
$totalNum = 0;
|
|
|
if (!empty($orderList)) {
|
|
|
foreach ($orderList as $orderInfo) {
|
|
|
@@ -2301,6 +2306,22 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //增加项
|
|
|
+ if ($tkPrice > 0) {
|
|
|
+ $refundList = RefundOrderClass::getAllByCondition(['relateOrderSn' => $orderSn], null, '*', null, true);
|
|
|
+ if (!empty($refundList)) {
|
|
|
+ foreach ($refundList as $refundInfo) {
|
|
|
+ if ($refundInfo->status == 1) {
|
|
|
+ if ($refundInfo->refundType == 2) {
|
|
|
+ $refundPrice = $refundInfo->refundPrice ?? 0;
|
|
|
+ $totalOnlyTkPrice = bcadd($totalOnlyTkPrice, $refundPrice, 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$totalCarton = bcadd($totalCarton, $carton, 2);
|
|
|
$totalPack = bcadd($totalPack, $pack, 2);
|
|
|
$totalFreight = bcadd($totalFreight, $freight, 2);
|
|
|
@@ -2369,7 +2390,9 @@ class OrderController extends BaseController
|
|
|
'totalNum' => $totalNum,
|
|
|
'totalPack' => $totalPack,
|
|
|
'totalFreight' => $totalFreight,
|
|
|
- 'totalTkPrice' => $totalTkPrice
|
|
|
+ 'totalTkPrice' => $totalTkPrice,
|
|
|
+ //增加项
|
|
|
+ 'totalOnlyTkPrice'=>$totalOnlyTkPrice,
|
|
|
]);
|
|
|
}
|
|
|
|