@@ -568,12 +568,13 @@ class DashboardController extends Controller
|
||||
if ($custom_id) {
|
||||
$productId = MonthlyUpdateMaster::where(['custom_id' => \Crypt::decrypt($custom_id), 'users_id' => auth()->guard('users')->user()->id])->value('products_id');
|
||||
$alternativeInvestmentFund = AlternativeInvestmentFund::where('products_id', $productId)->first();
|
||||
// dd($alternativeInvestmentFund);
|
||||
$monthlyUpdateMaster = MonthlyUpdateMaster::where(['custom_id' => \Crypt::decrypt($custom_id), 'users_id' => auth()->guard('users')->user()->id])->first();
|
||||
// dd($alternativeInvestmentFund);
|
||||
}
|
||||
|
||||
|
||||
$aifProduct = (object)[
|
||||
$aifProduct = (object)[
|
||||
// 'encrypted_custom_id' => $custom_id,
|
||||
'name_of_the_aif_fund' => $monthlyUpdateMaster->product_name ?? null,
|
||||
'fund_category' => $monthlyUpdateMaster->fund_category ?? null,
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
title="Holding and Reedemed"> --}}
|
||||
<a class="action_icon hold_reedem" data-bs-toggle="tooltip"
|
||||
{{-- data-count="{{ $count }}" {{$data->products == null ? onclick="holdingStatus({{ $data->id }},'{{ $data->holding_status }}',{{ $count }})" }} onclick="holdingStatus({{ $data->id }},'{{ $data->holding_status }}',{{ $count }}, {{ $data->products == null ? 'null' : ($data->products->profit_sharing == null ? $data->products->id : $data->products->profit_sharing) }})" --}} data-count="{{ $count }}"
|
||||
onclick="holdingStatus({{ $data->id }},'{{ $data->holding_status }}',{{ $count }},{{ $data->products ? ($data->products->profit_sharing == null ? 'null' : $data->products->profit_sharing ) : 'null' }}, '{{ $data->custom_id }}','{{ $data->categories }}',{{ $data->products_id }})"
|
||||
onclick="holdingStatus({{ $data->id }},'{{ $data->holding_status }}',{{ $count }},{{ $data->products != null ? ($data->products->profit_sharing == null ? 'null' : $data->products->profit_sharing ) : 'null' }}, '{{ $data->custom_id }}','{{ $data->categories }}',{{ $data->products_id }})"
|
||||
data-bs-custom-class="tooltip-inverse" data-bs-placement="top"
|
||||
title="Holding and Reedemed">
|
||||
<label
|
||||
@@ -892,8 +892,10 @@
|
||||
});
|
||||
|
||||
function holdingStatus(id, status, count = null, profitSharing, customId, categories, productId) {
|
||||
// alert(profitSharing);
|
||||
if (profitSharing >= 0 && status == 'Holding') {
|
||||
// alert(Math.ceil(profitSharing));
|
||||
// profitSharing = 2;
|
||||
// console.log(Math.ceil(profitSharing),profitSharing);
|
||||
if (Math.ceil(profitSharing) > 0 && status == 'Holding') {
|
||||
$('#id').val(id);
|
||||
$('#product_id').val(productId);
|
||||
$('#status').val(status);
|
||||
@@ -903,7 +905,7 @@
|
||||
$('#categories').val(categories);
|
||||
$('#exampleModalCenter').modal('show');
|
||||
}
|
||||
if (status == 'Reedemed') {
|
||||
if(profitSharing == 0 || profitSharing == null || status == 'Reedemed') {
|
||||
let text;
|
||||
status == 'Holding' ? text = 'redeem' : text = 'hold';
|
||||
Swal.fire({
|
||||
|
||||
Reference in New Issue
Block a user