diff --git a/common/libraries/receiver/Orders_v2_entity.php b/common/libraries/receiver/Orders_v2_entity.php index 0ede6624..d378b99b 100644 --- a/common/libraries/receiver/Orders_v2_entity.php +++ b/common/libraries/receiver/Orders_v2_entity.php @@ -344,6 +344,11 @@ class Orders_v2_entity{ ]; } if($to_com_price>0 && !$this->ci->app_liche_orders_model->count(['o_id'=>$this->order_row['id'],'type'=>3,'status>='=>0])){ + if(!$this->order_row['payway']){ //分期订单 尾款商户号取定定金订单的 + $book_order = $this->ci->app_liche_orders_model->get(['status>='=>0,'type'=>1,'o_id'=>$oid]); + $book_order['mch_id'] && $companys['company']['wx_mchid'] = $book_order['mch_id']; + $book_order['company_id'] && $companys['company']['id'] = $book_order['company_id']; + } $order_type = 3; $sid = create_order_no(350200,'liche',1,$order_type); $add_data[] = [ @@ -656,5 +661,4 @@ class Orders_v2_entity{ } return $img; } - }