|
@@ -367,11 +367,13 @@ class ContractServer
|
|
|
$agencyMoney=round(($contract->{'money'}-$contract->{'platform_money'})*$contract->{'agency_proportion'}/100,6);
|
|
|
$exchangeMoney=CommonServer::creatServer()->getConfigValue('exchange_money');
|
|
|
$dbMoney=$agencyMoney*$exchangeMoney;
|
|
|
- if($agencyMoney>0){
|
|
|
+ if($exchangeMoney >0){
|
|
|
$member=Member::where('id',$contract->{'m_id'})->select(['id','address','is_boss'])->first();
|
|
|
$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');
|
|
|
+ $this->addDistribution($contract->{'id'},$contract->{'m_id'},0,$agencyMoney,7,0,$sedimentAddress,$contract->{'agency_proportion'},1,'代币价格为0,转入沉淀分账');
|
|
|
$this->addContractLog($contract,'代币价格为0,不分发');
|
|
|
}
|
|
|
|