Browse Source

一些功能

Kirin 3 years ago
parent
commit
bcd4e982e8

+ 1 - 1
app/api/controller/admin/StoreOrderController.php

@@ -689,7 +689,7 @@ class StoreOrderController
         $data['refund_price'] = bcadd($price, $orderInfo['refund_price'], 2);
         $bj = bccomp((float)$orderInfo['pay_price'], (float)$data['refund_price'], 2);
         if ($bj < 0) return app('json')->fail('退款金额大于支付金额,请修改退款金额');
-        $refundData['pay_price'] = $orderInfo['pay_price'];
+        $refundData['pay_price'] = bcadd($orderInfo['pay_price'], $orderInfo['deposit'], 2);
         $refundData['refund_price'] = $price;
         $refundData['refund_id'] = $orderInfo['order_id'] . time();
         if ($orderInfo['pay_type'] == 'weixin') {

+ 0 - 1
crmeb/services/MiniProgramService.php

@@ -300,7 +300,6 @@ class MiniProgramService
      */
     public static function payOrderRefund($orderNo, array $opt)
     {
-        var_dump($opt);
         if (!isset($opt['pay_price'])) exception('缺少pay_price');
         $totalFee = floatval(bcmul($opt['pay_price'], 100, 0));
         $refundFee = isset($opt['refund_price']) ? floatval(bcmul($opt['refund_price'], 100, 0)) : null;