Merge branch 'main' of https://github.com/Ritikeshyadav/my-freeu into shaileshfreeu

This commit is contained in:
Shailesh-1981
2024-06-13 14:44:47 +05:30
8 changed files with 98 additions and 9 deletions

View File

@@ -846,6 +846,15 @@ class AuthController extends Controller
if (!$userCreated) {
return response()->json(['status' => 400, 'message' => 'Error creating user!'])->setStatusCode(400);
} else {
//sending notifications
$name = $request->name;
$notify['message'] = "$name has registered to Jericho Alternatives Website and App!";
$type = "New Users";
$users = User::admins()->get();
foreach ($users as $data) {
$data->notify(new UserAdmin($notify, $type));
}
$user = User::where('email', $request->email)->first();
$userToken = $user->createToken('apiToken')->plainTextToken;
return response()->json(['status' => 200, 'message' => 'User Created', 'token' => $userToken, 'data' => $user]);
@@ -911,6 +920,14 @@ class AuthController extends Controller
if (!$userCreated) {
return response()->json(['status' => 400, 'message' => 'Error creating user!'])->setStatusCode(400);
} else {
//sending notifications
$name = $request->name2;
$notify['message'] = "$name has registered to Jericho Alternatives Website and App!";
$type = "New Users";
$users = User::admins()->get();
foreach ($users as $data) {
$data->notify(new UserAdmin($notify, $type));
}
$user = User::where('email', $request->email2)->first();
$userToken = $user->createToken('apiToken')->plainTextToken;
return response()->json(['status' => 200, 'message' => 'User Created', 'token' => $userToken, 'data' => $user]);

View File

@@ -211,7 +211,7 @@ class AlternativeInvestmentFundController extends Controller
->get();
$product = AlternativeInvestmentFund::where('slug', '=', $slug)->first();
$productData = Product::with('product_images')->where('id', '=', $product->products_id)->first();
// dd($privateEquityFund);
// dd($privateEquityFund,$productData,$product);
return view('Frontend.Pages.alternative-investment-fund.private-equity-fund-product', compact('privateEquityFund', 'otherPEF', 'product', 'productData'));
}
@@ -269,8 +269,8 @@ class AlternativeInvestmentFundController extends Controller
->get();
$productData = AlternativeInvestmentFund::where('slug', '=', $slug)->first();
$product = Product::with('product_images')->where('id', '=', $productData->products_id)->first();
// dd($productData);
// dd($productData);
// dd($productData,$product,$hedgeFund,$otherHF);
return view('Frontend.Pages.alternative-investment-fund.hedge-fund-product', compact('hedgeFund', 'otherHF', 'productData', 'product'));
}

View File

@@ -82,17 +82,18 @@ class MarketplaceFractionalRealEstateSeller extends Model
// return $totalSellUnits += (int)$data->no_of_units_you_wish_to_buy;
// });
// $id = $this->id;
if(MarketplaceBuyerForm::where(['associated_id'=>$id,'table' => 'marketplace_fre_sellers'])->exists())
if(MarketplaceBuyerForm::where(['associated_id'=>$this->id,'table' => 'marketplace_fre_sellers'])->exists())
{
$getFREData = MarketplaceFractionalRealEstateSeller::where('id',$id)->first();
$getFREData = MarketplaceFractionalRealEstateSeller::where('id',$this->id)->first();
// dd((int)$getFREData->current_market_value_of_the_property <= 0);
// $aifData = (int)$getFREData->no_of_units_you_wish_to_sell;
// $remainUnits = $aifData - $totalSellUnits;
if($getFREData->current_market_value_of_the_property <= 0)
if((int)$getFREData->current_market_value_of_the_property <= 0)
{
return 'SOLD';
}
else{
return 'OPEN';
return 'OPEN';
}
}else{
return 'OPEN';

View File

@@ -36,7 +36,24 @@ class CommissionService
}
public function commissionCalculation($product,$investmentValue){
$grossCommissionedEarned = ($investmentValue * $product->trail_rate) / 100;
$trail_rate = 0;
if($product->return_type == 'Monthly')
{
$trail_rate += $product->trail_rate / 12 ;
}
if($product->return_type == 'Quarterly')
{
$trail_rate += $product->trail_rate / 4 ;
}
if($product->return_type == 'Half-Yearly')
{
$trail_rate += $product->trail_rate / 2 ;
}
if($product->return_type == 'Yearly')
{
$trail_rate += $product->trail_rate ;
}
$grossCommissionedEarned = ($investmentValue * $trail_rate) / 100;
$gst = ($grossCommissionedEarned * $product->gst) / 100;
$tds = ($grossCommissionedEarned * $product->tds) / 100;
return [

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -101,7 +101,7 @@
<div class="tables row">
<div class="col-md-4">
<p>Registration Number</p>
<span>{{ $privateEquityFund->registration_number ?? '-' }}</span>
<span>{{ $hedgeFund->registration_number ?? '-' }}</span>
</div>
<div class="col-md-4">
<p>Fund category</p>
@@ -320,6 +320,60 @@
</div>
</div>
</div>
<div class="categeory">
<div class="details aos-init aos-animate" data-aos="zoom-in">
<div class="tables row">
<div class="col-md-4">
<p>ISIN Code</p>
<span>{{ $product->isin_code ?? '-' }}</span>
</div>
<div class="col-md-4">
<p>Focused Real Estate Sectors</p>
<span>{{ $product->focused_real_estate_sectors ?? '-' }}</span>
</div>
<div class="col-md-4">
<p>Rera Complied Property</p>
<span>{{ $product->rera_complied_property ?? '-' }}</span>
</div>
</div>
</div>
</div>
<div class="categeory">
<div class="details aos-init aos-animate" data-aos="zoom-in">
<div class="tables row">
<div class="col-md-4">
<p>Return On Investment</p>
<span>{{ $product->return_on_investment ?? '-' }}</span>
</div>
<div class="col-md-4">
<p>Valuation Per Sector</p>
<span>{{ $product->valuation_per_sector ?? '-' }}</span>
</div>
<div class="col-md-4">
<p>Focused Funds</p>
<span>{{ $product->focused_funds ?? '-' }}</span>
</div>
</div>
</div>
</div>
<div class="categeory">
<div class="details aos-init aos-animate" data-aos="zoom-in">
<div class="tables row">
<div class="col-md-4">
<p>Trading Strategy</p>
<span>{{ $product->trading_strategy ?? '-' }}</span>
</div>
<div class="col-md-4">
<p>Trading Strategy Used</p>
<span>{{ $product->trading_strategy_used ?? '-' }}</span>
</div>
<div class="col-md-4">
<p>Involved In Short Selling</p>
<span>{{ $product->involved_in_short_selling ?? '-' }}</span>
</div>
</div>
</div>
</div>
<div class="categeory">
<div class="details aos-init aos-animate" data-aos="zoom-in">
<div class="tables">