mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
php cs fixes
This commit is contained in:
parent
0f92b6c82e
commit
80b85d5c21
@ -73,12 +73,12 @@ class EmailReport
|
||||
|
||||
public string $report_name = '';
|
||||
|
||||
/**
|
||||
/**
|
||||
* Optional array of report keys for
|
||||
* filter the columns of the report
|
||||
*
|
||||
* @var array $report_keys
|
||||
*
|
||||
*
|
||||
* @var array $report_keys
|
||||
*
|
||||
* */
|
||||
public array $report_keys = [];
|
||||
|
||||
@ -89,9 +89,9 @@ class EmailReport
|
||||
|
||||
public bool $include_tax = true;
|
||||
|
||||
/**
|
||||
* Comma separated string of statuses for filtering the Invoice report
|
||||
*
|
||||
/**
|
||||
* Comma separated string of statuses for filtering the Invoice report
|
||||
*
|
||||
* all
|
||||
* draft
|
||||
* sent
|
||||
@ -99,7 +99,7 @@ class EmailReport
|
||||
* unpaid
|
||||
* overdue
|
||||
* viewed
|
||||
*
|
||||
*
|
||||
* */
|
||||
public string $status = '';
|
||||
|
||||
|
@ -928,11 +928,9 @@ class BaseController extends Controller
|
||||
} //allows us to selective display bank integrations back to the user if they can view / create bank transactions but without the bank balance being present in the response
|
||||
elseif($this->entity_type == TaxRate::class && $user->hasIntersectPermissions(['create_invoice','edit_invoice','create_quote','edit_quote','create_purchase_order','edit_purchase_order'])) {
|
||||
// need to show tax rates if the user has the ability to create documents.
|
||||
}
|
||||
elseif($this->entity_type == ExpenseCategory::class && $user->hasPermission('create_expense')) {
|
||||
} elseif($this->entity_type == ExpenseCategory::class && $user->hasPermission('create_expense')) {
|
||||
// need to show expense categories if the user has the ability to create expenses.
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$query->where('user_id', '=', $user->id);
|
||||
}
|
||||
} elseif (in_array($this->entity_type, [Design::class, GroupSetting::class, PaymentTerm::class, TaskStatus::class])) {
|
||||
|
@ -248,7 +248,7 @@ class PreviewController extends BaseController
|
||||
$company = $user->company();
|
||||
$design = \App\Models\Design::query()
|
||||
->where('id', $request_data['design_id'])
|
||||
->where(function ($q) use ($user){
|
||||
->where(function ($q) use ($user) {
|
||||
$q->whereNull('company_id')->orWhere('company_id', $user->companyId());
|
||||
})
|
||||
->first();
|
||||
|
@ -68,7 +68,7 @@ class SearchController extends Controller
|
||||
'type' => '/client',
|
||||
'id' => $contact->client->hashed_id,
|
||||
'path' => "/clients/{$contact->client->hashed_id}"
|
||||
];
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,9 @@ class VendorExpenseNotify implements ShouldQueue
|
||||
{
|
||||
MultiDB::setDB($this->db);
|
||||
|
||||
if(!$this->expense->vendor)
|
||||
if(!$this->expense->vendor) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->expense->vendor->contacts->filter(function (VendorContact $contact) {
|
||||
return $contact->send_email && $contact->email;
|
||||
|
@ -624,7 +624,7 @@ class PdfBuilder
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row['$task.cost'], 'properties' => ['data-ref' => 'task_table-task.cost-td']];
|
||||
} elseif ($cell == '$product.discount' && !$this->service->company->enable_product_discount) {
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row['$product.discount'], 'properties' => ['data-ref' => 'product_table-product.discount-td', 'style' => 'display: none;']];
|
||||
}elseif ($cell == '$task.hours') {
|
||||
} elseif ($cell == '$task.hours') {
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row['$task.quantity'], 'properties' => ['data-ref' => 'task_table-task.hours-td']];
|
||||
} elseif ($cell == '$product.tax_rate1') {
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row[$cell], 'properties' => ['data-ref' => 'product_table-product.tax1-td']];
|
||||
@ -806,7 +806,7 @@ class PdfBuilder
|
||||
$elements[] = ['element' => 'th', 'content' => $aliases[$column] . '_label', 'properties' => ['data-ref' => "{$type}_table-" . substr($aliases[$column], 1) . '-th', 'hidden' => $this->service->config->settings->hide_empty_columns_on_pdf]];
|
||||
} elseif ($column == '$product.discount' && !$this->service->company->enable_product_discount) {
|
||||
$elements[] = ['element' => 'th', 'content' => $column . '_label', 'properties' => ['data-ref' => "{$type}_table-" . substr($column, 1) . '-th', 'style' => 'display: none;']];
|
||||
}elseif ($column == '$product.tax_rate1') {
|
||||
} elseif ($column == '$product.tax_rate1') {
|
||||
$elements[] = ['element' => 'th', 'content' => $column . '_label', 'properties' => ['data-ref' => "{$type}_table-product.tax1-th", 'hidden' => $this->service->config->settings->hide_empty_columns_on_pdf]];
|
||||
} elseif ($column == '$product.tax_rate2') {
|
||||
$elements[] = ['element' => 'th', 'content' => $column . '_label', 'properties' => ['data-ref' => "{$type}_table-product.tax2-th", 'hidden' => $this->service->config->settings->hide_empty_columns_on_pdf]];
|
||||
|
@ -69,9 +69,9 @@ class PdfMock
|
||||
if(isset($this->request['design_id']) && $design = Design::withTrashed()->find($this->request['design_id'])) {
|
||||
$pdf_config->design = $design;
|
||||
$pdf_config->entity_design_id = $design->hashed_id;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
$pdf_config->design = Design::withTrashed()->find($this->decodePrimaryKey($pdf_config->entity_design_id));
|
||||
}
|
||||
|
||||
$pdf_service->config = $pdf_config;
|
||||
|
||||
|
@ -799,7 +799,7 @@ class Design extends BaseDesign
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row['$task.cost'], 'properties' => ['data-ref' => 'task_table-task.cost-td']];
|
||||
} elseif ($cell == '$product.discount' && !$this->company->enable_product_discount) {
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row['$product.discount'], 'properties' => ['data-ref' => 'product_table-product.discount-td', 'style' => 'display: none;']];
|
||||
} elseif ($cell == '$task.hours') {
|
||||
} elseif ($cell == '$task.hours') {
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row['$task.quantity'], 'properties' => ['data-ref' => 'task_table-task.hours-td']];
|
||||
} elseif ($cell == '$product.tax_rate1') {
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $row[$cell], 'properties' => ['data-ref' => 'product_table-product.tax1-td']];
|
||||
|
@ -82,12 +82,11 @@ class PdfMaker
|
||||
|
||||
$ts = new TemplateService();
|
||||
|
||||
if(isset($this->data['template']['entity'])){
|
||||
try{
|
||||
if(isset($this->data['template']['entity'])) {
|
||||
try {
|
||||
$entity = $this->data['template']['entity'];
|
||||
$ts->setCompany($entity->company);
|
||||
}
|
||||
catch(\Exception $e){
|
||||
} catch(\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -179,11 +179,13 @@ class TemplateService
|
||||
|
||||
private function getSettings(): object
|
||||
{
|
||||
if($this->settings)
|
||||
if($this->settings) {
|
||||
return $this->settings;
|
||||
}
|
||||
|
||||
if($this->client)
|
||||
if($this->client) {
|
||||
return $this->client->getMergedSettings();
|
||||
}
|
||||
|
||||
return $this->company->settings;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user