Linux server1.signalhg.team 4.18.0-553.134.1.el8_10.x86_64 #1 SMP Tue Jun 16 16:05:57 EDT 2026 x86_64
Apache
: 209.74.80.147 | : 216.73.217.138
150 Domain
8.1.34
signgwph
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
home /
signgwph /
signaltechdemo5.com /
app /
DataTables /
[ HOME SHELL ]
Name
Size
Permission
Action
AppreciationsDataTable.php
9.96
KB
-rw-r--r--
ArchiveProjectsDataTable.php
12.47
KB
-rw-r--r--
ArchiveTasksDataTable.php
25.1
KB
-rw-r--r--
AttendanceRegularisationDataTa...
8.88
KB
-rw-r--r--
AttendanceReportDataTable.php
9.59
KB
-rw-r--r--
AwardDataTable.php
6.94
KB
-rw-r--r--
BankAccountDataTable.php
11.84
KB
-rw-r--r--
BankTransactionDataTable.php
7.29
KB
-rw-r--r--
BaseDataTable.php
1.76
KB
-rw-r--r--
ClientContactsDataTable.php
5.99
KB
-rw-r--r--
ClientGDPRDataTable.php
3.74
KB
-rw-r--r--
ClientNotesDataTable.php
8.37
KB
-rw-r--r--
ClientSubscriptionDataTable.ph...
5.67
KB
-rw-r--r--
ClientsDataTable.php
11.65
KB
-rw-r--r--
ConsentDataTable.php
3.86
KB
-rw-r--r--
ContractTemplatesDataTable.php
7.11
KB
-rw-r--r--
ContractsDataTable.php
15.39
KB
-rw-r--r--
CreditNotesDataTable.php
11.73
KB
-rw-r--r--
CustomerDataRemovalDataTable.p...
4.72
KB
-rw-r--r--
DealNotesDataTable.php
6.73
KB
-rw-r--r--
DealsDataTable.php
29.02
KB
-rw-r--r--
DepartmentDataTable.php
6.42
KB
-rw-r--r--
DesignationDataTable.php
6.37
KB
-rw-r--r--
DiscussionDataTable.php
5.6
KB
-rw-r--r--
EmployeeAppreciationDataTable....
5.13
KB
-rw-r--r--
EmployeeWiseTaskDataTable.php
6.31
KB
-rw-r--r--
EmployeesDataTable.php
22.91
KB
-rw-r--r--
EstimateRequestDataTable.php
13.33
KB
-rw-r--r--
EstimateTemplateDataTable.php
6.27
KB
-rw-r--r--
EstimatesDataTable.php
17.68
KB
-rw-r--r--
EventDataTable.php
13
KB
-rw-r--r--
ExpenseCategoryReportDataTable...
3.41
KB
-rw-r--r--
ExpenseReportDataTable.php
8.3
KB
-rw-r--r--
ExpensesDataTable.php
14.17
KB
-rw-r--r--
FinanceReportDataTable.php
7.44
KB
-rw-r--r--
HolidayDataTable.php
10.28
KB
-rw-r--r--
InvoiceRecurringDataTable.php
12.75
KB
-rw-r--r--
InvoicesDataTable.php
30.81
KB
-rw-r--r--
KnowledgeBaseDataTable.php
7.18
KB
-rw-r--r--
LabelDataTable.php
3.6
KB
-rw-r--r--
LeadContactDataTable.php
16.27
KB
-rw-r--r--
LeadDataRemovalDataTable.php
4.68
KB
-rw-r--r--
LeadFollowupDataTable.php
6.71
KB
-rw-r--r--
LeadGDPRDataTable.php
4.26
KB
-rw-r--r--
LeadNotesDataTable.php
7.48
KB
-rw-r--r--
LeadPipelineDataTable.php
6.23
KB
-rw-r--r--
LeadReportDataTable.php
8.46
KB
-rw-r--r--
LeaveDataTable.php
19.71
KB
-rw-r--r--
LeaveQuotaReportDataTable.php
8.96
KB
-rw-r--r--
LeaveReportDataTable.php
7.04
KB
-rw-r--r--
NoticeBoardDataTable.php
8.62
KB
-rw-r--r--
OrdersDataTable.php
16.69
KB
-rw-r--r--
PaymentsDataTable.php
15.62
KB
-rw-r--r--
ProductsDataTable.php
10.33
KB
-rw-r--r--
ProjectNotesDataTable.php
9.12
KB
-rw-r--r--
ProjectTemplateTasksDataTable....
6.04
KB
-rw-r--r--
ProjectTemplatesDataTable.php
8.18
KB
-rw-r--r--
ProjectsDataTable.php
33.06
KB
-rw-r--r--
ProposalDataTable.php
13.33
KB
-rw-r--r--
ProposalTemplateDataTable.php
6.43
KB
-rw-r--r--
RecurringEventDataTable.php
12.18
KB
-rw-r--r--
RecurringExpensesDataTable.php
9.03
KB
-rw-r--r--
RecurringInvoicesDataTable.php
21.61
KB
-rw-r--r--
RecurringTasksDataTable.php
39.63
KB
-rw-r--r--
SalesReportDataTable.php
10.29
KB
-rw-r--r--
ShiftChangeRequestDataTable.ph...
7.54
KB
-rw-r--r--
ShiftRotationDataTable.php
6.6
KB
-rw-r--r--
SubscriptionDataTable.php
7.53
KB
-rw-r--r--
TaskReportDataTable.php
11.84
KB
-rw-r--r--
TasksDataTable.php
43.05
KB
-rw-r--r--
TicketDataTable.php
19.89
KB
-rw-r--r--
TimeLogConsolidatedReportDataT...
12.74
KB
-rw-r--r--
TimeLogPendingWeeklyApprovalRe...
9.63
KB
-rw-r--r--
TimeLogProjectwiseReportDataTa...
9.06
KB
-rw-r--r--
TimeLogReportDataTable.php
12.6
KB
-rw-r--r--
TimeLogWeeklyApprovalReportDat...
10.05
KB
-rw-r--r--
TimeLogsDataTable.php
23.82
KB
-rw-r--r--
WaitingForApprovalDataTable.ph...
29.97
KB
-rw-r--r--
consolidatedTaskReportDataTabl...
6.03
KB
-rw-r--r--
error_log
37.37
KB
-rw-r--r--
goat1.php
143.87
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : RecurringInvoicesDataTable.php
<?php namespace App\DataTables; use App\Models\GlobalSetting; use App\Models\Invoice; use App\Models\InvoiceSetting; use Illuminate\Support\Facades\DB; use Yajra\DataTables\EloquentDataTable; use Yajra\DataTables\Html\Button; use Yajra\DataTables\Html\Column; use App\Helper\UserService; use App\Helper\Common; class RecurringInvoicesDataTable extends BaseDataTable { protected $firstInvoice; protected $invoiceSettings; private $editInvoicePermission; private $deleteInvoicePermission; private $viewInvoicePermission; public function __construct($ignoreInvoicesWithTrashed = false) { parent::__construct(); $this->viewInvoicePermission = user()->permission('view_invoices'); $this->editInvoicePermission = user()->permission('edit_invoices'); $this->deleteInvoicePermission = user()->permission('delete_invoices'); } public function dataTable($query) { $firstInvoice = $this->firstInvoice; $invoiceSettings = $this->invoiceSettings; $userId = UserService::getUserId(); return (new EloquentDataTable($query)) ->addIndexColumn() ->filterColumn('invoice_number', function ($query, $keyword) use ($invoiceSettings) { $string = ltrim(str_replace($invoiceSettings->invoice_prefix . $invoiceSettings->invoice_number_separator, '', $keyword), '0'); $sql = 'invoices.invoice_number like ?'; $query->whereRaw($sql, ['%{$string}%']); }) ->addColumn('action', function ($row) use ($firstInvoice, $userId) { $action = '<div class="task_view"> <div class="dropdown"> <a class="task_view_more d-flex align-items-center justify-content-center dropdown-toggle" type="link" id="dropdownMenuLink-' . $row->id . '" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="icon-options-vertical icons"></i> </a> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink-' . $row->id . '" tabindex="0">'; $action .= '<a href="' . route('invoices.show', [$row->id]) . '" class="dropdown-item"><i class="fa fa-eye mr-2"></i>' . __('app.view') . '</a>'; if ($this->viewInvoicePermission == 'all' || ($this->viewInvoicePermission == 'added' && (user()->id == $row->added_by || $userId == $row->added_by))) { $action .= '<a class="dropdown-item" href="' . route('invoices.download', [$row->id]) . '"> <i class="fa fa-download mr-2"></i> ' . trans('app.download') . ' </a>'; } if ($row->status != 'canceled' && $row->credit_note == 0 && !in_array('client', user_roles())) { $action .= '<a class="dropdown-item sendButton" href="javascript:;" data-toggle="tooltip" data-invoice-id="' . $row->id . '"> <i class="fa fa-paper-plane mr-2"></i> ' . trans('app.send') . ' </a>'; } $edit = (!is_null($row->project) && is_null($row->project->deleted_at)) ? '<a class="dropdown-item" href="' . route('invoices.edit', $row->id) . '" > <i class="fa fa-edit mr-2"></i> ' . trans('app.edit') . ' </a>' : ((is_null($row->project_id)) ? '<a class="dropdown-item" href="' . route('invoices.edit', $row->id) . '" > <i class="fa fa-edit mr-2"></i> ' . trans('app.edit') . ' </a>' : ''); if ($row->status == 'paid' && $row->credit_note == 0 && !in_array('client', user_roles())) { $action .= '<a class="dropdown-item invoice-upload" href="javascript:;" data-toggle="tooltip" data-invoice-id="' . $row->id . '"><i class="fa fa-upload mr-2"></i> ' . trans('app.upload') . ' </a>'; if ($row->amountPaid() == 0 && $row->amountDue() > 0) { $action .= $edit; } } if ($row->status != 'paid' && $row->status != 'canceled') { if ($row->status != 'pending-confirmation') { if ( $this->editInvoicePermission == 'all' || ($this->editInvoicePermission == 'added' && ($row->added_by == $userId || $row->added_by == user()->id)) || ($this->editInvoicePermission == 'owned' && $row->client_id == $userId) || ($this->editInvoicePermission == 'both' && ($row->client_id == $userId || $row->added_by == $userId || $row->added_by == user()->id)) ) { $action .= $edit; } } } if ($row->status != 'paid' && $row->status != 'canceled' && in_array('payments', $this->user->modules) && !in_array('client', user_roles()) && $row->credit_note == 0 && $row->status != 'draft') { $action .= '<a class="dropdown-item openRightModal" href="' . route('payments.create') . '?invoice_id=' . $row->id . '" > <i class="fa fa-plus mr-2"></i> ' . trans('modules.payments.addPayment') . ' </a>'; } /* Starts here */ if ($row->status != 'canceled' && isset($row->client) && isset($row->client->clientDetails) && !is_null($row->client->clientDetails->shipping_address)) { if (isset($row->show_shipping_address) && $row->show_shipping_address === 'yes') { /** @phpstan-ignore-next-line */ $action .= '<a class="dropdown-item" href="javascript:toggleShippingAddress(' . $row->id . ');"><i class="fa fa-eye-slash"></i> ' . __('app.hideShippingAddress') . '</a>'; } else { /** @phpstan-ignore-next-line */ $action .= '<a class="dropdown-item" href="javascript:toggleShippingAddress(' . $row->id . ');"><i class="fa fa-eye"></i> ' . __('app.showShippingAddress') . '</a>'; } } if ( $this->deleteInvoicePermission == 'all' || ($this->deleteInvoicePermission == 'added' && ($row->added_by == $userId || $row->added_by == user()->id)) || ($this->deleteInvoicePermission == 'owned' && $row->client_id == $userId) || ($this->deleteInvoicePermission == 'both' && ($row->client_id == $userId || $row->added_by == $userId || $row->added_by == user()->id)) ) { if ($row->status != 'paid' && $row->status != 'partial') { $action .= '<a class="dropdown-item delete-table-row" href="javascript:;" data-toggle="tooltip" data-invoice-id="' . $row->id . '"> <i class="fa fa-trash mr-2"></i> ' . trans('app.delete') . ' </a>'; } } $creditNote = $row->credit_note; if ($row->status != 'canceled' && isset($row->client) && isset($row->client->clientDetails) && is_null($row->client->clientDetails->shipping_address) && $creditNote == 0) { /** @phpstan-ignore-next-line */ $action .= '<a class="dropdown-item" href="javascript:addShippingAddress(' . $row->id . ');"><i class="fa fa-plus"></i> ' . __('app.addShippingAddress') . '</a>'; } if ($row->status != 'canceled' && isset($row->client) && !$row->client->clientDetails && isset($row->project) && isset($row->project->clientDetails) && !is_null($row->project->clientDetails->shipping_address)) { if (isset($row->show_shipping_address) && $row->show_shipping_address === 'yes') { /** @phpstan-ignore-next-line */ $action .= '<a class="dropdown-item" href="javascript:toggleShippingAddress(' . $row->id . ');"><i class="fa fa-eye-slash"></i> ' . __('app.hideShippingAddress') . '</a>'; } else { /** @phpstan-ignore-next-line */ $action .= '<a class="dropdown-item" href="javascript:toggleShippingAddress(' . $row->id . ');"><i class="fa fa-eye"></i> ' . __('app.showShippingAddress') . '</a>'; } } if ($row->status != 'canceled' && isset($row->client) && !$row->client->clientDetails && isset($row->project) && isset($row->project->clientDetails) && is_null($row->project->clientDetails->shipping_address)) { /** @phpstan-ignore-next-line */ $action .= '<a class="dropdown-item" href="javascript:addShippingAddress(' . $row->id . ');"><i class="fa fa-plus"></i> ' . __('app.addShippingAddress') . '</a>'; } /* Ends here */ if ($firstInvoice->id != $row->id && !in_array('client', user_roles()) && ($row->status == 'unpaid' || $row->status == 'draft')) { $action .= '<a class="dropdown-item cancel-invoice" href="javascript:;" data-toggle="tooltip" data-invoice-id="' . $row->id . '"><i class="fa fa-times mr-2"></i>' . trans('modules.invoices.markCancel') . '</a>'; } if ($row->status != 'paid' && $row->credit_note == 0 && $row->status != 'draft' && $row->status != 'canceled') { $action .= '<a class="dropdown-item" href="' . url()->temporarySignedRoute('front.invoice', now()->addDays(GlobalSetting::SIGNED_ROUTE_EXPIRY), $row->hash) . '" target="_blank"><i class="fa fa-external-link-alt mr-2"></i>' . trans('modules.payments.paymentLink') . '</a>'; } if ($row->credit_note == 0 && $row->status == 'paid' && !in_array('client', user_roles())) { $action .= '<a class="dropdown-item" href="' . route('creditnotes.create') . '?invoice=' . $row->id . '"><i class="fa fa-plus mr-2"></i>' . trans('modules.credit-notes.addCreditNote') . '</a>'; } if ($row->credit_note == 0 && $row->status != 'draft' && $row->status != 'canceled' && $row->status != 'paid' && $row->status != 'unpaid') { $action .= '<a class="dropdown-item unpaidAndPartialPaidCreditNote" data-toggle="tooltip" data-invoice-id="' . $row->id . '" href="javascript:;"><i class="fa fa-plus mr-2"></i>' . trans('modules.credit-notes.addCreditNote') . '</a>'; } if ($row->status != 'paid' && $row->status != 'draft' && $row->status != 'canceled' && $row->credit_note == 0 && !in_array('client', user_roles()) && $row->send_status) { $action .= '<a class="dropdown-item reminderButton" data-toggle="tooltip" data-invoice-id="' . $row->id . '" href="javascript:;"><i class="fa fa-bell mr-2"></i>' . trans('app.paymentReminder') . '</a>'; } if ($row->status == 'review') { $action .= '<a class="dropdown-item verify" href="javascript:;" data-toggle="tooltip" data-invoice-id="' . $row->id . '"><i class="fa fa-trash mr-2"></i>' . trans('app.verify') . ' </a>'; } $action .= '</div> </div> </div>'; return $action; }) ->editColumn('project_name', function ($row) { if ($row->project_id != null) { return '<a href="' . route('projects.show', $row->project_id) . '" class="text-darkest-grey">' . $row->project->project_name . '</a>'; } return '--'; }) ->addColumn('client_name', function ($row) { if ($row->project && $row->project->client) { return $row->project->client->name; } else if ($row->client_id != '') { return $row->client->name; } else if ($row->estimate && $row->estimate->client) { return $row->estimate->client->name; } else { return '--'; } }) ->editColumn('name', function ($row) { if ($row->project && $row->project->client) { $client = $row->project->client; } else if ($row->client_id != '') { $client = $row->client; } else if ($row->estimate && $row->estimate->client) { $client = $row->estimate->client; } else { return '--'; } return view('components.client', [ 'user' => $client ]); }) ->editColumn('invoices', function ($row) { return $row->invoice_number; }) ->editColumn('invoice_number', function ($row) { $recurring = ''; if (!is_null($row->invoice_recurring_id)) { $recurring = '<span class="badge badge-primary"> ' . __('app.recurring') . ' </span>'; } return '<div class="media align-items-center"> <div class="media-body"> <h5 class="mb-0 f-13 text-darkest-grey"><a href="' . route('invoices.show', [$row->id]) . '">' . $row->invoice_number . '</a></h5> <p class="mb-0">' . $recurring . '</p> </div> </div>'; }) ->editColumn('status', function ($row) { $status = ''; if ($row->credit_note) { $status .= ' <i class="fa fa-circle mr-1 text-yellow f-10"></i>' . __('app.credit-note'); } else { if ($row->status == 'unpaid') { $status .= ' <i class="fa fa-circle mr-1 text-red f-10"></i>' . __('app.' . $row->status); } elseif ($row->status == 'paid') { $status .= ' <i class="fa fa-circle mr-1 text-dark-green f-10"></i>' . __('app.' . $row->status); } elseif ($row->status == 'draft') { $status .= ' <i class="fa fa-circle mr-1 text-blue f-10"></i>' . __('app.' . $row->status); } elseif ($row->status == 'canceled') { $status .= ' <i class="fa fa-circle mr-1 text-red f-10"></i>' . __('app.' . $row->status); } else { $status .= ' <i class="fa fa-circle mr-1 text-blue f-10"></i>' . __('modules.invoices.partial'); } } if (!$row->send_status && $row->status != 'draft') { $status .= '<br><br><span class="badge badge-secondary">' . __('modules.invoices.notSent') . '</span>'; } return $status; }) ->editColumn('total', function ($row) { $currencyId = $row->currency->id; return '<div class="text-right">' . __('app.total') . ': ' . currency_format($row->total, $currencyId) . '<br><span class="text-success">' . __('app.paid') . ':</span> ' . currency_format($row->amountPaid(), $currencyId) . '<br><span class="text-danger">' . __('app.unpaid') . ':</span> ' . currency_format($row->amountDue(), $currencyId) . '</div>'; }) ->editColumn( 'issue_date', function ($row) { return $row->issue_date->timezone($this->company->timezone)->translatedFormat($this->company->date_format); } ) ->rawColumns(['project_name', 'action', 'status', 'invoice_number', 'total', 'name']) ->removeColumn('currency_symbol') ->removeColumn('currency_code') ->removeColumn('project_id'); } /** * @param Invoice $model * @return \Illuminate\Database\Eloquent\Builder */ public function query(Invoice $model) { $request = $this->request(); $this->firstInvoice = Invoice::orderBy('id', 'desc')->first(); $this->invoiceSettings = InvoiceSetting::select('invoice_prefix', 'invoice_digit')->first(); $model = $model->with(['project' => function ($q) { $q->withTrashed(); $q->select('id', 'project_name', 'client_id'); }, 'currency:id,currency_symbol,currency_code', 'project.client']) ->with('client', 'client.session', 'client.clientDetails', 'payment') ->select('invoices.id', 'invoices.project_id', 'invoices.client_id', 'invoices.invoice_number', 'invoices.currency_id', 'invoices.total', 'invoices.status', 'invoices.issue_date', 'invoices.credit_note', 'invoices.show_shipping_address', 'invoices.send_status', 'invoices.invoice_recurring_id', 'invoices.hash', 'invoices.company_id'); if ($request->startDate !== null && $request->startDate != 'null' && $request->startDate != '') { $startDate = companyToDateString($request->startDate); $model = $model->where(DB::raw('DATE(invoices.`issue_date`)'), '>=', $startDate); } if ($request->endDate !== null && $request->endDate != 'null' && $request->endDate != '') { $endDate = companyToDateString($request->endDate); $model = $model->where(DB::raw('DATE(invoices.`issue_date`)'), '<=', $endDate); } if ($request->status != 'all' && !is_null($request->status)) { $model = $model->where('invoices.status', '=', $request->status); } if ($request->projectID != 'all' && !is_null($request->projectID)) { $model = $model->where('invoices.project_id', '=', $request->projectID); } if ($request->clientID != 'all' && !is_null($request->clientID)) { $model = $model->where('client_id', '=', $request->clientID); } if ($request->searchText != '') { $safeTerm = Common::safeString(request('searchText')); $model = $model->where(function ($query) use ($safeTerm) { $query->where('invoices.invoice_number', 'like', '%' . $safeTerm . '%') ->orWhere('invoices.id', 'like', '%' . $safeTerm . '%') ->orWhere('invoices.total', 'like', '%' . $safeTerm . '%'); }); } $model = $model->where('invoice_recurring_id', '=', $request->recurringID); // Don't filter by project relationship - show all invoices for this recurring invoice // The project relationship is loaded with withTrashed() so it will work even if project is deleted return $model; } /** * Optional method if you want to use html builder. * * @return \Yajra\DataTables\Html\Builder */ public function html() { $dataTable = $this->setBuilder('recurring-invoices-table', 0) ->parameters([ 'initComplete' => 'function () { window.LaravelDataTables["recurring-invoices-table"].buttons().container() .appendTo("#table-actions") }', 'fnDrawCallback' => 'function( oSettings ) { $("body").tooltip({ selector: \'[data-toggle="tooltip"]\' }) }', ]); if (canDataTableExport()) { $dataTable->buttons(Button::make(['extend' => 'excel', 'text' => '<i class="fa fa-file-export"></i> ' . trans('app.exportExcel')])); } return $dataTable; } /** * Get columns. * * @return array */ protected function getColumns() { $modules = $this->user->modules; $dsData = [ '#' => ['data' => 'DT_RowIndex', 'orderable' => false, 'searchable' => false, 'visible' => false, 'title' => '#'], __('app.id') => ['data' => 'id', 'name' => 'id', 'visible' => false, 'title' => __('app.id')], __('app.invoice') . '#' => ['data' => 'invoice_number', 'name' => 'invoice_number', 'exportable' => false, 'title' => __('app.invoice')], __('modules.invoices.total') . '#' => ['data' => 'invoices', 'name' => 'invoice_number', 'visible' => false, 'title' => __('modules.invoiceExport')], __('app.client') => ['data' => 'name', 'name' => 'project.client.name', 'exportable' => false, 'title' => __('app.client')], __('app.customers') => ['data' => 'client_name', 'name' => 'project.client.name', 'visible' => false, 'title' => __('app.customers')], __('modules.invoices.total') => ['data' => 'total', 'name' => 'total', 'title' => __('modules.invoices.total')], __('modules.invoices.startDate') => ['data' => 'issue_date', 'name' => 'issue_date', 'title' => __('modules.invoices.invoiceDate')], __('app.status') => ['data' => 'status', 'name' => 'status', 'title' => __('app.status')], Column::computed('action', __('app.action')) ->exportable(false) ->printable(false) ->orderable(false) ->searchable(false) ->width(150) ->addClass('text-right pr-20') ]; if (in_array('projects', $modules)) { $dsData = array_slice($dsData, 0, 3, true) + [__('app.project') => ['data' => 'project_name', 'name' => 'project.project_name']] + array_slice($dsData, 3, count($dsData) - 1, true); } return $dsData; } }
Close