mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 12:24:34 -04:00
php cs fixes
This commit is contained in:
parent
0f92b6c82e
commit
80b85d5c21
@ -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
|
} //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'])) {
|
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.
|
// 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.
|
// need to show expense categories if the user has the ability to create expenses.
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$query->where('user_id', '=', $user->id);
|
$query->where('user_id', '=', $user->id);
|
||||||
}
|
}
|
||||||
} elseif (in_array($this->entity_type, [Design::class, GroupSetting::class, PaymentTerm::class, TaskStatus::class])) {
|
} elseif (in_array($this->entity_type, [Design::class, GroupSetting::class, PaymentTerm::class, TaskStatus::class])) {
|
||||||
|
@ -41,8 +41,9 @@ class VendorExpenseNotify implements ShouldQueue
|
|||||||
{
|
{
|
||||||
MultiDB::setDB($this->db);
|
MultiDB::setDB($this->db);
|
||||||
|
|
||||||
if(!$this->expense->vendor)
|
if(!$this->expense->vendor) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->expense->vendor->contacts->filter(function (VendorContact $contact) {
|
$this->expense->vendor->contacts->filter(function (VendorContact $contact) {
|
||||||
return $contact->send_email && $contact->email;
|
return $contact->send_email && $contact->email;
|
||||||
|
@ -69,9 +69,9 @@ class PdfMock
|
|||||||
if(isset($this->request['design_id']) && $design = Design::withTrashed()->find($this->request['design_id'])) {
|
if(isset($this->request['design_id']) && $design = Design::withTrashed()->find($this->request['design_id'])) {
|
||||||
$pdf_config->design = $design;
|
$pdf_config->design = $design;
|
||||||
$pdf_config->entity_design_id = $design->hashed_id;
|
$pdf_config->entity_design_id = $design->hashed_id;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
$pdf_config->design = Design::withTrashed()->find($this->decodePrimaryKey($pdf_config->entity_design_id));
|
$pdf_config->design = Design::withTrashed()->find($this->decodePrimaryKey($pdf_config->entity_design_id));
|
||||||
|
}
|
||||||
|
|
||||||
$pdf_service->config = $pdf_config;
|
$pdf_service->config = $pdf_config;
|
||||||
|
|
||||||
|
@ -86,8 +86,7 @@ class PdfMaker
|
|||||||
try {
|
try {
|
||||||
$entity = $this->data['template']['entity'];
|
$entity = $this->data['template']['entity'];
|
||||||
$ts->setCompany($entity->company);
|
$ts->setCompany($entity->company);
|
||||||
}
|
} catch(\Exception $e) {
|
||||||
catch(\Exception $e){
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,11 +179,13 @@ class TemplateService
|
|||||||
|
|
||||||
private function getSettings(): object
|
private function getSettings(): object
|
||||||
{
|
{
|
||||||
if($this->settings)
|
if($this->settings) {
|
||||||
return $this->settings;
|
return $this->settings;
|
||||||
|
}
|
||||||
|
|
||||||
if($this->client)
|
if($this->client) {
|
||||||
return $this->client->getMergedSettings();
|
return $this->client->getMergedSettings();
|
||||||
|
}
|
||||||
|
|
||||||
return $this->company->settings;
|
return $this->company->settings;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user