From 7b68573b2b728f91c761a5892b4abf5c07f7920a Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Thu, 3 Dec 2020 17:11:31 +0800
Subject: [PATCH] =?UTF-8?q?L45~47=20->=20Revert=20"3=E5=95=86=E8=8E=B7?=
 =?UTF-8?q?=E5=BE=97=E4=BA=A7=E5=93=81=E5=88=B8"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 0ac236a61967e0662f5b21dd2f9de470882bd188.
---
 hyhproject/common/model/Settlements.php | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/hyhproject/common/model/Settlements.php b/hyhproject/common/model/Settlements.php
index 325c6ab..5745cd8 100755
--- a/hyhproject/common/model/Settlements.php
+++ b/hyhproject/common/model/Settlements.php
@@ -146,12 +146,12 @@ class Settlements extends Base
                 $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($agentUserId,'realTotalMoney');
                 $agentProductMoney = 0;
                 if($yesterdayBuyMoney >= dataConf('shopPreCoupousYdGTMoney')){//大于设定值
-                    $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1
+                    $agentProductMoney = round($calBaseNum * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1
                 }else{
-                    $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2
+                    $agentProductMoney = round($calBaseNum * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2
                 }
                 if($agentProductMoney >= 0.0001){
-                    Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,$agentProductMoney,0,'订单【'.$order->orderNo.'】商超监管购户所得');
+                    Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,0,$agentProductMoney,'订单【'.$order->orderNo.'】商超监管购户所得');
                 }
             }            
             //乡镇代理
@@ -163,12 +163,12 @@ class Settlements extends Base
                 $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($agentUserId,'realTotalMoney');
                 $agentProductMoney = 0;
                 if($yesterdayBuyMoney >= dataConf('shopPreCoupousYdGTMoney')){//大于设定值
-                    $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1
+                    $agentProductMoney = round($calBaseNum * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1
                 }else{
-                    $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2
+                    $agentProductMoney = round($calBaseNum * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2
                 }
                 if($agentProductMoney >= 0.01){
-                    Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,$agentProductMoney,0,'订单【'.$order->orderNo.'】商厦监管购户所得');
+                    Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,0,$agentProductMoney,'订单【'.$order->orderNo.'】商厦监管购户所得');
                 }
             }
             //区县代理            
@@ -179,12 +179,12 @@ class Settlements extends Base
                 $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($agentUserId,'realTotalMoney');
                 $agentProductMoney = 0;
                 if($yesterdayBuyMoney >= dataConf('shopPreCoupousYdGTMoney')){//大于设定值
-                    $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1
+                    $agentProductMoney = round($calBaseNum * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1
                 }else{
-                    $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2
+                    $agentProductMoney = round($calBaseNum * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2
                 }
                 if($agentProductMoney >= 0.01){
-                    Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,$agentProductMoney,0,'订单【'.$order->orderNo.'】商都监管购户所得');
+                    Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,0,$agentProductMoney,'订单【'.$order->orderNo.'】商都监管购户所得');
                 }
             }
         }