xieruidong 2 年之前
父节点
当前提交
e4f59808bb
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      application/common/model/Admin.php
  2. 1 1
      application/common/service/OrderService.php

+ 2 - 2
application/common/model/Admin.php

@@ -14,8 +14,8 @@ class Admin extends Model
      * @param $amount
      * @return int|string
      */
-    public static function getCmn($amount){
-        $per=config('site.manager_commission_per')?:0;
+    public static function getCmn($amount,GoodsSku $sku){
+        $per=$sku['fx_per']?:0;
         if($per<=0){
             return 0;
         }

+ 1 - 1
application/common/service/OrderService.php

@@ -245,7 +245,7 @@ class OrderService extends BaseService {
             $goods['amount_total']=bcadd($goods['amount_total'],$goods['amount_install']);
             $goods['amount_pay']=bcAddAll($goods['amount_goods_real'],$goods['amount_install']);
             $goods['amount_discount']=bcAddAll($goods['amount_coupon'],$goods['amount_coupon_kill'],$goods['amount_coupon_level']);
-            $goods['amount_cmn']=Admin::getCmn($goods['amount_pay']);
+            $goods['amount_cmn']=Admin::getCmn($goods['amount_pay'],$goods['sku']);
 
             $info['amount_pay']=bcadd($info['amount_pay'],$goods['amount_pay']);
             $info['amount_total']=bcadd($info['amount_total'],$goods['amount_total']);