Linux localhost 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 23.92.16.63 | : 162.158.63.181
Cant Read [ /etc/named.conf ]
8.1.5
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
crm.oxopackaging.com /
app /
Exports /
[ HOME SHELL ]
Name
Size
Permission
Action
AgentSaleExport.php
7.75
KB
-rw-r--r--
DailyLeadsExport.php
473
B
-rw-r--r--
DealExport.php
10.96
KB
-rw-r--r--
EstimationsExport.php
4.11
KB
-rw-r--r--
MarketingExport.php
11.3
KB
-rw-r--r--
MonthlyReportExport.php
2.38
KB
-rw-r--r--
OrderPNLExport.php
8.58
KB
-rw-r--r--
ProductionExport.php
8.54
KB
-rw-r--r--
ReordersExport.php
7.02
KB
-rw-r--r--
SalariesExport.php
8.01
KB
-rw-r--r--
ShippingExport.php
10.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ProductionExport.php
<?php namespace App\Exports; use App\Models\Deal; use App\Models\Tracking; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithMapping; use Maatwebsite\Excel\Concerns\WithHeadings; class ProductionExport implements FromCollection,WithHeadings,WithMapping { protected $deal_name; protected $user_deals; protected $from; protected $to; function __construct($deal_name, $user_deals, $from, $to) { $this->deal_name = $deal_name; $this->user_deals = $user_deals; $this->from = $from; $this->to = $to; } /** * @return \Illuminate\Support\Collection */ public function collection() { $data = Deal::select('*')->with(['deals','client','vendor','production_details','dealProducts','dealProducts.product','dealProducts.productstyle','owner'])->orderBy('id','desc'); if($this->deal_name ) { $data->whereHas('client', function ($queryu) { $queryu->where('name', 'like', $this->deal_name . '%')->orWhere(function ($ques) { $ques->whereHas('clientDetails', function ($queryu) { $queryu->where('value', 'like', $this->deal_name . '%')->orWhere(function ($ques) { $ques->where('order_number' ,'like', $this->deal_name.'%'); }); }); }); }); }if(!empty($this->user_deals )) { $data->where('owner_id' ,'=', $this->user_deals); }else{ if(auth()->user()->id!=1 && auth()->user()->id!=63 && auth()->user()->id!=207 && auth()->user()->id!=276 && auth()->user()->id!=188 && auth()->user()->id!=106 && auth()->user()->id!=90 && auth()->user()->id!=94) { $data->where('owner_id', '=', auth()->user()->id); } } if (!empty($this->from && $this->to)) { $data->whereHas('production_details', function ($queryu){ if (!empty($this->from && $this->to)) { $queryu->whereBetween('send_date', [date($this->from), date($this->to)]); } else { $first = date("Y-m-d", strtotime("1-02-2017"));; $last = date("Y-m-d", strtotime("last day of this month")); $queryu->whereBetween('send_date', [date($first), date($last)]); } });} $data->where('shipping_status','=','0'); //$data->where('production_status','=','1')->where('deal_status','=','1')->where('shipping_status','=','0')->orWhere('designer_status','=','1'); $data->where(function ($quer){ $quer->where('production_status','=',1)->where('designer_status','=',1) ->orWhere('production_status','=',0); })->where(function ($q){ $q->where(function ($qs){ $qs->where('bd_pipeline_stage_id','=',4)->where('pipeline_stage_id','=',5); })->orWhere('pipeline_stage_id','=',4); }); return $data->get(); } public function headings(): array { return [ 'Order Number', 'Client Name', 'Client Email', 'Client Phone', 'Product', 'Box Style', 'Box Printing', 'Box Length', 'Box Width', 'Box Height', 'Box Measurement Units', 'Quantity', 'Cardboard Stock', 'Printing Colors', 'Vendor Name', 'Time Frame', 'Production Sending Date', 'Expected Production Date', 'Sent Quantity', 'Received Quantity', 'Agent' ]; } /** * @var Invoice $deal */ public function map($deal): array { $esamount = array(); $quantity = array(); $product = ''; $productstyle = ''; $product_printings = ''; $ramount = ''; $balance = 0; $client = ''; $vendor = ''; $time_frame = ''; $send_date=''; $expect_date=''; $receive_date=''; $receive_qty=''; if (isset($deal->client->emails)) { foreach ($deal->client->emails as $email) { $emails = $email->value ?? ''; } } if (isset($deal->vendor->name)) { $vendor = $deal->vendor->name ?? ""; } if (isset($deal->client->phoneNos)) { foreach ($deal->client->phoneNos as $phoneNos) { $phone_no = $phoneNos->value; } } foreach ($deal->dealProducts as $productdetail) { foreach ($productdetail->dealProductQuantityAndEstimationAmounts as $key => $qty) { if ($key == 0) { $dollar_rev = $qty->deal_product_amount; $rev_in_pkr = $qty->deal_product_amount * $deal->dollar_rate; } } } foreach ($deal->dealProducts as $productdetail) { $product = $productdetail->product->name; } foreach ($deal->dealProducts as $productdetail) { if (isset($productdetail->productstyle)) { $productstyle = $productdetail->productstyle->name; } } foreach ($deal->dealProducts as $productdetail) { $product_length = $productdetail->product_length; } foreach ($deal->dealProducts as $productdetail) { $product_width = $productdetail->product_width; } foreach ($deal->dealProducts as $productdetail) { $product_height = $productdetail->product_height; } foreach ($deal->dealProducts as $productdetail) { $product_unit = $productdetail->product_unit->unit ?? ''; } foreach ($deal->dealProducts as $productdetail) { $product_stock = $productdetail->product_stock->name ?? ''; } foreach ($deal->dealProducts as $productdetail) { $productColor = $productdetail->productColor->name ?? ''; } foreach ($deal->production_details as $productdetail){ if ($productdetail->tframe == 1) { $time_frame = 'Standard'; } else { $time_frame = 'Urgent'; } } foreach ($deal->production_details as $productdetail){ if(isset($productdetail['send_date'])) { $send_date= date("d-m-Y", strtotime($productdetail['send_date'])); } } foreach ($deal->production_details as $productdetail){ if(isset($productdetail['expected_receiving_date'])) { $expect_date= date("d-m-Y", strtotime($productdetail['expected_receiving_date'])); } } foreach ($deal->production_details as $productdetail){ if(isset($productdetail['receiving_date'])) { $receive_date= date("d-m-Y", strtotime($productdetail['receiving_date'])); } } foreach ($deal->production_details as $productdetail){ if(isset($productdetail['qty'])) { $receive_qty= $productdetail['qty']; } } foreach ($deal->dealProducts as $key=> $productdetail){ foreach ($productdetail->product_printings as $k=> $qty) { if($k==0) { $product_printings = $qty->name ; }else{ $product_printings .= '-' .$qty->name ; } } } $x=1; foreach ($deal->dealProducts as $key=> $productdetail) foreach ($productdetail->dealProductQuantityAndEstimationAmounts as $qty) { if ($x == 1) { $quantity = $qty->deal_product_quantity; } $x++; } return [ [ $deal->order_number, $client, $emails, $phone_no, $product, $productstyle, $product_printings, $product_length, $product_width, $product_height, $product_unit, $quantity, $product_stock, $productColor, $vendor, $time_frame, $send_date, $expect_date, $receive_date, $quantity, $receive_qty, $deal->owner->first_name .' '.$deal->owner->last_name ] ]; } }
Close