diff --git a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php index bb30e9b..cc7cdac 100644 --- a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php +++ b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php @@ -522,7 +522,7 @@ class ManageFreeUInvestmentController extends Controller 'year3_return' => $request->year3_return, ]); - $product = Product::where('id', $request->product_fund_id)->first(); + $product = Product::where('id', (int)$request->product_fund_id)->first(); // dd($product); if ($request->has('presentation')) { if (\File::exists(public_path('/uploads/product/presentation/' . $product->presentation))) { @@ -530,7 +530,7 @@ class ManageFreeUInvestmentController extends Controller } $productpresentation = time() . '_presentation' . '.' . $request->presentation->extension(); $request->presentation->move(public_path('/uploads/product/presentation'), $productpresentation); - $updatepresentation = Product::where('id', $request->product_fund_id)->update([ + $updatepresentation = Product::where('id', (int)$request->product_fund_id)->update([ 'presentation' => $productpresentation, ]); } @@ -541,7 +541,7 @@ class ManageFreeUInvestmentController extends Controller } $productfactsheet = time() . '_factsheet' . '.' . $request->fact_sheet->extension(); $request->fact_sheet->move(public_path('uploads/product/fact_sheet'), $productfactsheet); - $updatefactsheet = Product::where('id', $request->product_fund_id)->update([ + $updatefactsheet = Product::where('id', (int)$request->product_fund_id)->update([ 'fact_sheet' => $productfactsheet, ]); } @@ -562,27 +562,27 @@ class ManageFreeUInvestmentController extends Controller } } - $imagesToRemove = $request->input('images_to_remove')[0]; - // dd($imagesToRemove); - if (!empty($imagesToRemove)) { - $imagesToRemoveJson = $request->input('images_to_remove')[0]; - $imagesToRemove = json_decode($imagesToRemoveJson); - foreach ($imagesToRemove as $imageId) { - $userFile = ProductImage::find($imageId); - if ($userFile) { - $file_path = public_path($userFile->images); - if (file_exists($file_path)) { - unlink($file_path); - } + // $imagesToRemove = $request->input('images_to_remove')[0]; + // // dd($imagesToRemove); + // if (!empty($imagesToRemove)) { + // $imagesToRemoveJson = $request->input('images_to_remove')[0]; + // $imagesToRemove = json_decode($imagesToRemoveJson); + // foreach ($imagesToRemove as $imageId) { + // $userFile = ProductImage::find($imageId); + // if ($userFile) { + // $file_path = public_path($userFile->images); + // if (file_exists($file_path)) { + // unlink($file_path); + // } - // Delete the record from the database - $userFile->delete(); - } - } - } + // // Delete the record from the database + // $userFile->delete(); + // } + // } + // } $fund = Fund::find($request->fund_id); - $type = Product::where('id', $fund->products_id)->update(['type' => $request->type,'description'=> $request->description]); + $type = Product::where('id', (int)$fund->product_fund_id)->update(['type' => $request->type,'description'=> $request->description]); return response()->json(['status' => 200, 'message' => 'Fund Updated Successfully']); } diff --git a/app/Http/Controllers/Admin/ManageUserProductController.php b/app/Http/Controllers/Admin/ManageUserProductController.php index 7a450c4..7dd23ff 100644 --- a/app/Http/Controllers/Admin/ManageUserProductController.php +++ b/app/Http/Controllers/Admin/ManageUserProductController.php @@ -1149,6 +1149,7 @@ class ManageUserProductController extends Controller { if($commissionDetail->commission_type == 'One-Time Commission' || $commissionDetail->commission_type == 'Hybrid Structure') { + // dd($commissionDetail->commission_type); $total_investment = (int)$amount; $applicable_rate = floatval($commissionDetail->upfront_rate); $gross_commission_earned = $total_investment / 100 * $applicable_rate ; @@ -1159,7 +1160,7 @@ class ManageUserProductController extends Controller 'monthly_id' => $monthlyId, 'total_investment_or_commitment_amount' => $total_investment, 'applicable_rate' => $commissionDetail->upfront_rate, - 'type_of_commission' => $commissionDetail->commission_type, + 'type_of_commission' => $commissionDetail->commission_type == 'Hybrid Structure' ? 'Hybrid Commission(Upfront)':$commissionDetail->commission_type, 'gross_commissioned_earned_inr' => $gross_commission_earned, 'gst' => $commissionDetail->gst, 'tds' => $commissionDetail->tds, diff --git a/app/Http/Controllers/Frontend/GlobalPrivateEquityFundController.php b/app/Http/Controllers/Frontend/GlobalPrivateEquityFundController.php index 311adce..437321b 100644 --- a/app/Http/Controllers/Frontend/GlobalPrivateEquityFundController.php +++ b/app/Http/Controllers/Frontend/GlobalPrivateEquityFundController.php @@ -26,9 +26,9 @@ class GlobalPrivateEquityFundController extends Controller public function globalPrivateEquityFundPage() { // $privateEquity = $this->privateEquityFundAllData()->getData(); - $openGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->open()->active()->latest()->get(); - $resaleGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get(); - $fullyFundedGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get(); + $openGPEF = Product::has('funds')->with('funds.compaines', 'categorys')->funds()->globalPrivateEquityFund()->open()->active()->latest()->get(); + $resaleGPEF = Product::has('funds')->with('funds.compaines', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get(); + $fullyFundedGPEF = Product::has('funds')->with('funds.compaines', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get(); $learnMore = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswer()->getData(); // $faqs = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswerFaqs()->getData(); // dd($openGPEF); diff --git a/app/Http/Controllers/Frontend/GlobalVentureCapitalFund.php b/app/Http/Controllers/Frontend/GlobalVentureCapitalFund.php index c4dc132..2e07299 100644 --- a/app/Http/Controllers/Frontend/GlobalVentureCapitalFund.php +++ b/app/Http/Controllers/Frontend/GlobalVentureCapitalFund.php @@ -28,7 +28,7 @@ class GlobalVentureCapitalFund extends Controller $ventureCapitalFund = Fund::where('slug',$slug)->first(); $productData = Fund::where('slug','=',$slug)->first(); $productData = Product::where('id','=',$productData->products_id)->first(); - // dd($ventureCapitalFund); + // dd($productData); return view('Frontend.Pages.venture-capital-funds.product',compact('ventureCapitalFund','productData')); } diff --git a/app/Http/Requests/StoreTestimonialRequest.php b/app/Http/Requests/StoreTestimonialRequest.php index 0b24945..dac119d 100644 --- a/app/Http/Requests/StoreTestimonialRequest.php +++ b/app/Http/Requests/StoreTestimonialRequest.php @@ -38,18 +38,19 @@ class StoreTestimonialRequest extends FormRequest public function validated() { - if($this->client_images === 'male.jpg' || $this->client_images === 'female.png'){ - $image = $this->client_images; - } - if($this->client_images === "One"){ - if($this->has('client_images_one')){ - $image = time() . '.' . $this->client_images_one->extension(); - $this->client_images_one->move(public_path('/uploads/testimonials/images'), $image); - } - } - return array_merge(parent::validated(), [ - 'rating' => $this->rating, - 'client_image' => $image - ]); + // if($this->client_images === 'male.jpg' || $this->client_images === 'female.png'){ + // $image = $this->client_images; + // } + // if($this->client_images === "One"){ + // if($this->has('client_images_one')){ + // $image = time() . '.' . $this->client_images_one->extension(); + // $this->client_images_one->move(public_path('/uploads/testimonials/images'), $image); + // } + // } + // return array_merge(parent::validated(), [ + // 'rating' => $this->rating, + // 'client_image' => $image + // ]); + return parent::validated(); } } diff --git a/app/Imports/FundImport.php b/app/Imports/FundImport.php index 2b3a362..6245582 100644 --- a/app/Imports/FundImport.php +++ b/app/Imports/FundImport.php @@ -112,7 +112,7 @@ class FundImport implements ToCollection, WithHeadingRow 'ytd' => $row['ytd'], 'year1_return' => $row['1_year_return'], 'year3_return' => $row['3_year_return'], - 'date_as_on' => getConvertedDate($row['data_as_on']) ?? null, + 'date_as_on' => array_key_exists('data_as_on',$row->toArray()) ? getConvertedDate($row['data_as_on']) ?? null : null, ]); if ($returns) { foreach ($returns as $key => $value) { diff --git a/app/Models/Product.php b/app/Models/Product.php index e10b999..db0d9f8 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -280,7 +280,7 @@ class Product extends Model public function scopeGlobalPrivateEquityFund($query) { - return $query->where(['categories_id' => Category::GlobalPrivateEquityFundId, 'tables_id' => 3, 'status' => true]); + return $query->where(['categories_id' => Category::GlobalPrivateEquityFundId, 'status' => true]); } public function scopePrivateEquityFunds($query) diff --git a/app/Services/Admin/LeadService.php b/app/Services/Admin/LeadService.php index 902110e..bbec719 100644 --- a/app/Services/Admin/LeadService.php +++ b/app/Services/Admin/LeadService.php @@ -100,7 +100,7 @@ class LeadService{ } public function storeNote($request){ - return LeadNote::updateOrCreate(['leads_id'=>$request->leads_id],['notes'=>$request->notes]); + return LeadNote::updateOrCreate(['leads_id'=>$request->leads_id],['notes'=>$request->notes,'created_by'=>\Auth::user()->id]); } public function storeAttachments($request){ diff --git a/app/Services/Admin/TestimonialService.php b/app/Services/Admin/TestimonialService.php index aa4597d..3ef067e 100644 --- a/app/Services/Admin/TestimonialService.php +++ b/app/Services/Admin/TestimonialService.php @@ -7,7 +7,7 @@ use App\Models\Admin\Testimonial; class TestimonialService { public function getTestimonials(){ - return Testimonial::all(); + return Testimonial::latest()->get(); } public function store($request){ diff --git a/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php b/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php index cf36ba6..7e35df9 100644 --- a/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php +++ b/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php @@ -37,7 +37,7 @@ -
+ {{--
@@ -77,7 +77,7 @@
-
+ --}}
diff --git a/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php b/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php index 54f8a40..60bf89a 100644 --- a/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php +++ b/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php @@ -39,7 +39,7 @@ -
+ {{--
-
+ --}}
diff --git a/resources/views/Admin/Pages/manage_cms/manage_testimonials/manage_testimonial.blade.php b/resources/views/Admin/Pages/manage_cms/manage_testimonials/manage_testimonial.blade.php index 7588771..6446abf 100644 --- a/resources/views/Admin/Pages/manage_cms/manage_testimonials/manage_testimonial.blade.php +++ b/resources/views/Admin/Pages/manage_cms/manage_testimonials/manage_testimonial.blade.php @@ -85,11 +85,11 @@ Sr. No. Name - Image + {{-- Image --}} Designation/Company Name Message - Rating + {{-- Rating --}} Date Actions @@ -111,18 +111,18 @@

{{ $datas->client_name }}

- + {{--
- + --}} {{ $datas->client_designation_company_name }} {{ substr(strip_tags($datas->description), 0, 80)}} - + {{--
@@ -132,7 +132,6 @@
@for($i=1; $i<=$datas->rating; $i++) - {{-- --}} @endfor
@@ -142,7 +141,7 @@
- + --}}
{{ date('d/m/Y',strtotime($datas->created_at)) }}
diff --git a/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php b/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php index da1566e..3e3310e 100644 --- a/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php +++ b/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php @@ -1944,7 +1944,7 @@ }, total_fees_paid: { required: true, - digits: true, + // digits: true, }, no_of_units_alloted: { required: true, @@ -2015,7 +2015,7 @@ }, total_fees_paid: { required: 'Please enter total fees paid', - digits: 'Please enter digits', + // digits: 'Please enter digits', }, no_of_units_alloted: { required: 'Please enter no. of units alloted', diff --git a/resources/views/Admin/Pages/manage_leads/view-lead.blade.php b/resources/views/Admin/Pages/manage_leads/view-lead.blade.php index 61f5b2c..f93cde5 100644 --- a/resources/views/Admin/Pages/manage_leads/view-lead.blade.php +++ b/resources/views/Admin/Pages/manage_leads/view-lead.blade.php @@ -780,7 +780,7 @@
diff --git a/resources/views/Frontend/Pages/profile/nri.blade.php b/resources/views/Frontend/Pages/profile/nri.blade.php index ae4c636..bc51174 100644 --- a/resources/views/Frontend/Pages/profile/nri.blade.php +++ b/resources/views/Frontend/Pages/profile/nri.blade.php @@ -109,7 +109,7 @@ name="proof_of_address_of_foreign" class="iv-input form-control p-2">
--}}
- +
diff --git a/resources/views/Frontend/Pages/testimonial.blade.php b/resources/views/Frontend/Pages/testimonial.blade.php index c9b5dad..a5a4ed2 100644 --- a/resources/views/Frontend/Pages/testimonial.blade.php +++ b/resources/views/Frontend/Pages/testimonial.blade.php @@ -3,7 +3,9 @@ @if(count($testimonial))
-
Testmonials
+
+

Testmonials

+
@foreach ($testimonial as $singleTestimonial)