added product name
This commit is contained in:
@@ -6,6 +6,8 @@ use App\Models\Product;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\AlternativeInvestmentFund;
|
||||
use App\Models\FractionalRealEstate;
|
||||
use App\Models\MonthlyUpdateAlternativeInvestmentFund;
|
||||
use App\Models\MonthlyUpdateFractionalRealEstate;
|
||||
use App\Models\MonthlyUpdateIndianFinancialAssets;
|
||||
@@ -192,8 +194,21 @@ class ManageCommissionController extends Controller
|
||||
|
||||
public function viewUserProduct($id)
|
||||
{
|
||||
$data = MonthlyUpdateMasterCommission::with('monthlyUpdate')->where('id', $id)->first();
|
||||
if($data)
|
||||
{
|
||||
if(AlternativeInvestmentFund::where('products_id',$data->monthlyUpdate->products_id)->exists())
|
||||
{
|
||||
$data->product_name = AlternativeInvestmentFund::where('products_id',$data->monthlyUpdate->products_id)->value('fund_name');
|
||||
}
|
||||
if(FractionalRealEstate::where('products_id',$data->monthlyUpdate->products_id)->exists())
|
||||
{
|
||||
$data->product_name = FractionalRealEstate::where('products_id',$data->monthlyUpdate->products_id)->value('property_name_and_location');
|
||||
}
|
||||
}
|
||||
// dd($data);
|
||||
return view('Admin.Pages.manage_commission.view_user_commission', [
|
||||
'product' => MonthlyUpdateMasterCommission::find($id)
|
||||
'product' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,25 +11,26 @@ class MonthlyUpdateMasterCommission extends Model
|
||||
|
||||
protected $table = 'monthly_update_commissions';
|
||||
|
||||
protected $fillable = ['monthly_id','total_investment_or_commitment_amount','applicable_rate','type_of_commission','gross_commissioned_earned_inr','gst','tds','net_commission_received'];
|
||||
protected $fillable = ['monthly_id', 'total_investment_or_commitment_amount', 'applicable_rate', 'type_of_commission', 'gross_commissioned_earned_inr', 'gst', 'tds', 'net_commission_received'];
|
||||
|
||||
public function monthlyUpdate(){
|
||||
return $this->belongsTo(MonthlyUpdateMaster::class,'monthly_id');
|
||||
public function monthlyUpdate()
|
||||
{
|
||||
return $this->belongsTo(MonthlyUpdateMaster::class, 'monthly_id');
|
||||
}
|
||||
|
||||
public function getTotalInvestmentOrCommitmentAmountAttribute($value)
|
||||
{
|
||||
return $this->IND_money_format($value) ;
|
||||
return $this->IND_money_format($value);
|
||||
}
|
||||
|
||||
public function getGrossCommissionedEarnedInrAttribute($value)
|
||||
{
|
||||
return $this->IND_money_format($value) ;
|
||||
return $this->IND_money_format($value);
|
||||
}
|
||||
|
||||
public function getNetCommissionReceivedAttribute($value)
|
||||
{
|
||||
return $this->IND_money_format($value) ;
|
||||
return $this->IND_money_format($value);
|
||||
}
|
||||
|
||||
function IND_money_format($number)
|
||||
@@ -57,4 +58,9 @@ class MonthlyUpdateMasterCommission extends Model
|
||||
|
||||
return '₹ ' . $result;
|
||||
}
|
||||
|
||||
public function products()
|
||||
{
|
||||
return $this->belongsTo(Product::class, 'products_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5703,6 +5703,18 @@ span.color-red {
|
||||
width: 100%;
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
|
||||
.categories-card.categories-two-card {
|
||||
width: 100%;
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
.menubar .admin-profile .dropdown-menu {
|
||||
position: relative !important;
|
||||
top: -45px !important;
|
||||
}
|
||||
.admin-profile .dropdown img.profile-icon {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
}
|
||||
|
||||
@@ -1033,4 +1033,15 @@ table.dataTable thead > tr > td.sorting_desc_disabled:after {
|
||||
width: 100%;
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
.categories-card.categories-two-card {
|
||||
width: 100%;
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
.menubar .admin-profile .dropdown-menu {
|
||||
position: relative !important;
|
||||
top: -45px !important;
|
||||
}
|
||||
.admin-profile .dropdown img.profile-icon {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1395,4 +1395,16 @@ a:active {
|
||||
width: 100%;
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
|
||||
.categories-card.categories-two-card {
|
||||
width: 100%;
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
.menubar .admin-profile .dropdown-menu {
|
||||
position: relative !important;
|
||||
top: -45px !important;
|
||||
}
|
||||
.admin-profile .dropdown img.profile-icon {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<label class="fs-6 fw-semibold form-label mt-3">
|
||||
<span class="">Product Name</span>
|
||||
</label>
|
||||
{{-- @dd($product) --}}
|
||||
|
||||
<input type="text" class="form-control form-control-solid"
|
||||
value="{{ $product->id }}" readonly>
|
||||
value="{{ $product->product_name }}" readonly>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="fs-6 fw-semibold form-label mt-3">
|
||||
|
||||
Reference in New Issue
Block a user