shish %!s(int64=2) %!d(string=hai) anos
pai
achega
09031087e5
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      app-ghs/controllers/TestController.php

+ 6 - 1
app-ghs/controllers/TestController.php

@@ -66,6 +66,8 @@ class TestController extends BaseController
                 $status = $ghsOrder['status'] ?? 0;
                 $orderSn = $ghsOrder['orderSn'] ?? '';
                 $actPrice = $ghsOrder['actPrice'] ?? 0;
+                $discountAmount = $ghsOrder['discountAmount'] ?? 0;
+                $labourCost = $ghsOrder['labourCost'] ?? 0;
                 $tkPrice = $ghsOrder['tkPrice'] ?? 0;
                 if ($book == 1 && $status == 2) {
                     //预订单待发货的不算收入
@@ -84,7 +86,10 @@ class TestController extends BaseController
                         $num = $orderItem->xhNum ?? 0;
                         $xhUnitPrice = $orderItem->xhUnitPrice ?? 0;
 
-                        $itemTotalAmount = bcadd($itemTotalAmount, bcmul($num, $xhUnitPrice), 2);
+                        $now = bcmul($num, $xhUnitPrice);
+                        if(floatval($now)!=floatval($actPrice) && $discountAmount<=0 && $labourCost<=0 && $tkPrice<=0){
+                            echo $orderSn;die;
+                        }
 
                         $remainNum = bcsub($num, $refundNum);
                         $classId = $orderItem->classId ?? 0;