|
@@ -236,9 +236,17 @@ class ContractServer
|
|
|
$indirectMoney=round(($contract->{'money'}-$contract->{'platform_money'})*$contract->{'indirect_proportion'}/100,6);
|
|
|
if(empty($indirectMember)){
|
|
|
$this->addContractLog($contract,'间推人信息不存在,停止清分');
|
|
|
- $this->addDistribution($contract->{'id'},$contract->{'m_id'},0,$indirectMoney,3,$directMember->{'id'},$directMember->{'address'},$contract->{'indirect_proportion'},0,'间推推分红,间推人不存在,未划分');
|
|
|
+ $this->addDistribution($contract->{'id'},$contract->{'m_id'},0,$indirectMoney,3,0,'',$contract->{'indirect_proportion'},0,'间推推分红,间推人不存在,未划分');
|
|
|
}else{
|
|
|
- $this->addDistribution($contract->{'id'},$contract->{'m_id'},0,$indirectMoney,3,$directMember->{'id'},$directMember->{'address'},$contract->{'indirect_proportion'},1,'间推推分红');
|
|
|
+ $this->addDistribution($contract->{'id'},$contract->{'m_id'},0,$indirectMoney,3,$indirectMember->{'id'},$indirectMember->{'address'},$contract->{'indirect_proportion'},1,'间推推分红');
|
|
|
+// $indirectNum=Member::where('recom_id',$indirectMember->{'id'})->count();
|
|
|
+// if($indirectNum>2){
|
|
|
+//
|
|
|
+// }else{
|
|
|
+// $this->addContractLog($contract,'间推人推广人数低于两人,停止清分');
|
|
|
+// $this->addDistribution($contract->{'id'},$contract->{'m_id'},0,$indirectMoney,3,$directMember->{'id'},$directMember->{'address'},$contract->{'indirect_proportion'},0,'间推人推广人数低于两人,停止清分');
|
|
|
+// }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -372,7 +380,7 @@ class ContractServer
|
|
|
$this->addDistribution($contract->{'id'},$contract->{'m_id'},$dbMoney,0,7,$member->{'id'},$member->{'address'},$contract->{'agency_proportion'},1,'代币分账');
|
|
|
MoneyDetailServer::creatServer()->write(1,1,$dbMoney,1,$member->{'id'},'报单代币清分',$contract->{'id'});
|
|
|
}else{
|
|
|
- $sedimentAddress=CommonServer::creatServer()->getConfigValue('sediment_address');
|
|
|
+ $sedimentAddress=CommonServer::creatServer()->getConfigValue('agency_address');
|
|
|
$this->addDistribution($contract->{'id'},$contract->{'m_id'},0,$agencyMoney,7,0,$sedimentAddress,$contract->{'agency_proportion'},1,'代币价格为0,转入沉淀分账');
|
|
|
$this->addContractLog($contract,'代币价格为0,不分发');
|
|
|
}
|