diff --git a/app/common/logic/StoreFinanceFlowLogic.php b/app/common/logic/StoreFinanceFlowLogic.php index a845c7ed..5692b929 100644 --- a/app/common/logic/StoreFinanceFlowLogic.php +++ b/app/common/logic/StoreFinanceFlowLogic.php @@ -148,16 +148,21 @@ class StoreFinanceFlowLogic extends BaseLogic { StoreFinanceFlow::where(['order_id' => $order_id, 'financial_type' => 11])->update(['status' => 1]); StoreFinanceFlow::where(['order_id' => $order_id, 'financial_type' => 2])->update(['status' => 1]); + $store=SystemStore::where('id',$store_id)->find(); + $capitalFlowDao = new CapitalFlowLogic($store); if ($money > 0) { + $capitalFlowDao->storeIncome('store_money_add', 'order', $order_id, $money); SystemStore::where('id', $store_id)->inc('store_money', $money)->update(); } if ($deposit > 0) { + $capitalFlowDao->storeIncome('store_paid_deposit_add', 'order', $order_id, $money); SystemStore::where('id', $store_id)->inc('paid_deposit', $deposit)->update(); } $find = StoreFinanceFlow::where(['order_id' => $order_id, 'financial_pm' => 1, 'financial_type' => 16, 'status' => 0])->find(); StoreFinanceFlow::where(['order_id' => $order_id, 'financial_type' => 16])->update(['status' => 1]); if ($find) { if ($find['number'] > 0) { + $capitalFlowDao->storeIncome('store_attrition_add', 'order', $order_id, $money); SystemStore::where('id', $store_id)->inc('attrition', $find['number'])->update(); } }