shish 2 years ago
parent
commit
ab0dc7fd40
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app-ghs/controllers/TestController.php

+ 3 - 3
app-ghs/controllers/TestController.php

@@ -108,9 +108,9 @@ class TestController extends BaseController
                         echo $orderSn . ' ' . $currentAmount . ' ' . $actPrice . ' ' . $discountAmount . ' ' . $labourCost . ' ' . $tkPrice;
                         echo $orderSn . ' ' . $currentAmount . ' ' . $actPrice . ' ' . $discountAmount . ' ' . $labourCost . ' ' . $tkPrice;
                         die;
                         die;
                     }
                     }
-                    if(floatval($actPrice)!=floatval($currentAmount)){
-                        echo $actPrice . ' ' . $currentAmount . ' ' . $orderSn .' ===='. "\n";
-                    }else{
+                    if (floatval($actPrice) != floatval($currentAmount)) {
+                        echo $actPrice . ' ' . $currentAmount . ' ' . $orderSn . ' ====' . abs(bcsub($actPrice, $currentAmount, 2)) . "\n";
+                    } else {
                         echo $actPrice . ' ' . $currentAmount . ' ' . $orderSn . "\n";
                         echo $actPrice . ' ' . $currentAmount . ' ' . $orderSn . "\n";
                     }
                     }