|
|
@@ -347,7 +347,7 @@ class PurchaseService extends BaseService
|
|
|
$actPrice = $info->actPrice;
|
|
|
//余额支付引起余额减少
|
|
|
if ($payWay == dict::getDict('payWay', 'balancePay')) {
|
|
|
- ShopClass::purchaseReduceBalance($shop, $realPrice, $info);//////////////////////////////////////////////////////////
|
|
|
+ ShopClass::purchaseReduceBalance($main, $shop, $realPrice, $info);
|
|
|
}
|
|
|
$main->totalPurchase = bcadd($main->totalPurchase, $actPrice, 2);
|
|
|
$currentExpend = bcadd($main->totalExpend, $actPrice, 2);
|
|
|
@@ -389,7 +389,7 @@ class PurchaseService extends BaseService
|
|
|
$main->save();
|
|
|
|
|
|
//支出统计
|
|
|
- StatOutClass::updateOrInsert($shop, $info->orderPrice);///////////////////////////////////////////////////
|
|
|
+ StatOutClass::updateOrInsert($main, $shop, $info->orderPrice);
|
|
|
//支出流水
|
|
|
$capitalType = dict::getDict('capitalType', 'xhPurchase', 'id');
|
|
|
$sjId = $info->sjId ?? 0;
|
|
|
@@ -409,7 +409,7 @@ class PurchaseService extends BaseService
|
|
|
|
|
|
//采购总量统计
|
|
|
$cgNum = $info->bigNum ?? 0;
|
|
|
- StatCgClass::replace($shop, $info->orderPrice, $cgNum);//////////////////////////////////////////////////////
|
|
|
+ StatCgClass::replace($main, $shop, $info->orderPrice, $cgNum);
|
|
|
//按供货商分别统计采购量
|
|
|
$num = $info->bigNum ?? 0;
|
|
|
$amount = $info->orderPrice ?? 0;
|
|
|
@@ -432,7 +432,7 @@ class PurchaseService extends BaseService
|
|
|
if (isset($info->ghsShopAdminId) && !empty($info->ghsShopAdminId)) {
|
|
|
$noNeedWxNotice = isset(Yii::$app->params['noNeedWxNotice']) ? Yii::$app->params['noNeedWxNotice'] : 0;
|
|
|
if ($noNeedWxNotice == 0) {
|
|
|
- WxMessageClass::generateCgOrder($shop, $info);///////////////////////////////////////////////////////////////
|
|
|
+ WxMessageClass::generateCgOrder($shop, $info);
|
|
|
}
|
|
|
}
|
|
|
|