fixing issue
This commit is contained in:
@@ -141,7 +141,7 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model
|
||||
$values = MarketplaceAlternativeInvestmentFundSeller::where('id', $this->id)->first();
|
||||
if($values->no_of_units_you_wish_to_sell <= 0)
|
||||
{
|
||||
return 0;
|
||||
return (string)0;
|
||||
}
|
||||
$bids = MarketplaceBuyerForm::where(['associated_id' => $this->id, 'table' => 'marketplace_aif_sellers'])->where('status','!=','Sold')->get();
|
||||
// $bids = MarketplaceBuyerForm::where(['associated_id' => $this->id, 'table' => 'marketplace_aif_sellers'])->get();
|
||||
@@ -162,7 +162,8 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model
|
||||
// dd($bid);
|
||||
if(count($bids))
|
||||
{
|
||||
return round($bid,3);
|
||||
$latestBid = round($bid,3);
|
||||
return (string)$latestBid;
|
||||
}
|
||||
|
||||
// dd($bids->toArray());
|
||||
@@ -173,6 +174,6 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model
|
||||
// if ($bidArr) {
|
||||
// return (string)max($bidArr);
|
||||
// }
|
||||
return (int)0;
|
||||
return (string)0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class MarketplaceFractionalRealEstateSeller extends Model
|
||||
$values = MarketplaceFractionalRealEstateSeller::where('id', $this->id)->first();
|
||||
if($values->current_market_value_of_the_property <= 0)
|
||||
{
|
||||
return 0;
|
||||
return (string)0;
|
||||
}
|
||||
$bids = MarketplaceBuyerForm::where(['associated_id' => $this->id, 'table' => 'marketplace_fre_sellers'])->where('status','!=','Sold')->get();
|
||||
$bidArr = [];
|
||||
@@ -66,9 +66,10 @@ class MarketplaceFractionalRealEstateSeller extends Model
|
||||
$bidArr[] = round(($bid->getAttributes()['total_purchase_value'] - $this->current_market_value_of_the_property)/$this->current_market_value_of_the_property * 100,3);
|
||||
}
|
||||
if($bidArr){
|
||||
return (int)max($bidArr);
|
||||
$bid = (int)max($bidArr);
|
||||
return (string)$bid;
|
||||
}
|
||||
return 0;
|
||||
return (string)0;
|
||||
}
|
||||
|
||||
public function getSoldStatusAttribute($id)
|
||||
|
||||
Reference in New Issue
Block a user