Merge pull request #8278 from turbo124/preview

Preview
This commit is contained in:
David Bomba 2023-02-12 14:00:00 +11:00 committed by GitHub
commit bc9b2d2567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
171 changed files with 284075 additions and 242563 deletions

View File

@ -10,9 +10,7 @@
## [Hosted](https://www.invoiceninja.com) | [Self-Hosted](https://www.invoiceninja.org)
Join us on [Slack](http://slack.invoiceninja.com), [Discourse](https://forum.invoiceninja.com) -
or [StackOverflow](https://stackoverflow.com/tags/invoice-ninja/) if you like,
just make sure to add the `invoice-ninja` tag to your question.
Join us on [Slack](http://slack.invoiceninja.com), [Discord](https://discord.gg/ZwEdtfCwXA), [Support Forum](https://forum.invoiceninja.com)
## Introduction
@ -27,13 +25,13 @@ We offer a $30 per year white-label license to remove the Invoice Ninja branding
* [API Documentation](https://app.swaggerhub.com/apis/invoiceninja/invoiceninja)
* [APP Documentation](https://invoiceninja.github.io/)
* [Support Forum](https://forum.invoiceninja.com)
* [StackOverflow](https://stackoverflow.com/tags/invoice-ninja/)
## Setup
### Mobile Apps
* [iPhone](https://apps.apple.com/app/id1503970375?platform=iphone)
* [Android](https://play.google.com/store/apps/details?id=com.invoiceninja.app)
* [F-Droid](https://f-droid.org/en/packages/com.invoiceninja.app)
### Desktop Apps
* [macOS](https://apps.apple.com/app/id1503970375?platform=mac)
@ -55,7 +53,7 @@ We offer a $30 per year white-label license to remove the Invoice Ninja branding
git clone https://github.com/invoiceninja/invoiceninja.git
git checkout v5-stable
cp .env.example .env
composer update
composer i -o --no-dev
php artisan key:generate
```

View File

@ -1 +1 @@
5.5.67
5.5.70

View File

@ -1138,7 +1138,7 @@ class CheckData extends Command
$cc = ClientContact::on('db-ninja-01')->where('company_id', config('ninja.ninja_default_company_id'))->where('email', $cu->user->email)->first();
if($cc){
$ninja_portal_url = "https://invoiceninja.invoicing.co/client/ninja/{$cc->contact_key}/{$cu->company->company_key}";
$ninja_portal_url = "https://invoiceninja.invoicing.co/client/ninja/{$cc->contact_key}/{$cu->account->key}";
$cu->ninja_portal_url = $ninja_portal_url;
$cu->save();

View File

@ -11,6 +11,7 @@
namespace App\Console\Commands;
use App\DataMapper\ClientRegistrationFields;
use App\DataMapper\CompanySettings;
use App\DataMapper\FeesAndLimits;
use App\Events\Invoice\InvoiceWasCreated;
@ -95,6 +96,9 @@ class CreateAccount extends Command
'portal_mode' => 'domain',
]);
$company->client_registration_fields = ClientRegistrationFields::generate();
$company->save();
$account->default_company_id = $company->id;
$account->save();

View File

@ -0,0 +1,74 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Console\Commands;
use DirectoryIterator;
use Faker\Factory;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class OpenApiYaml extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ninja:openapi';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Build OpenApi YAML';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
$this->faker = Factory::create();
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$path = base_path('openapi');
$directory = new DirectoryIterator($path);
$this->info($directory);
foreach ($directory as $file) {
$this->info($file);
Storage::disk('base')->delete('/openapi/api-docs.yaml');
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/info.yaml'));
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/paths/paths.yaml'));
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/components.yaml'));
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/misc/misc.yaml'));
}
}
}

View File

@ -383,7 +383,7 @@ class CompanySettings extends BaseSettings
public $page_layout = 'portrait';
public $font_size = 7; //@implemented
public $font_size = 16; //@implemented
public $primary_font = 'Roboto';
@ -834,7 +834,6 @@ class CompanySettings extends BaseSettings
'$client.address1',
'$client.address2',
'$client.city_state_postal',
'$client.postal_city',
'$client.country',
'$client.phone',
'$contact.email',
@ -846,7 +845,6 @@ class CompanySettings extends BaseSettings
'$vendor.address1',
'$vendor.address2',
'$vendor.city_state_postal',
'$vendor.postal_city',
'$vendor.country',
'$vendor.phone',
'$contact.email',
@ -871,7 +869,6 @@ class CompanySettings extends BaseSettings
'$company.address1',
'$company.address2',
'$company.city_state_postal',
'$company.postal_city',
'$company.country',
],
'invoice_details' => [

View File

@ -0,0 +1,19 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;
use Exception;
class ClientHostedMigrationException extends Exception
{
// ..
}

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -1,4 +1,14 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;

View File

@ -232,6 +232,28 @@ abstract class QueryFilters
}
public function updated_at($value = '')
{
if ($value == '')
return $this->builder;
try {
if (is_numeric($value)) {
$created_at = Carbon::createFromTimestamp((int)$value);
} else {
$created_at = Carbon::parse($value);
}
return $this->builder->where('updated_at', '>=', $created_at);
} catch (\Exception $e) {
return $this->builder;
}
}
public function is_deleted($value)
{
if ($value == 'true') {

View File

@ -46,7 +46,7 @@ class ActivityController extends BaseController
* tags={"actvities"},
* summary="Gets a list of actvities",
* description="Lists all activities",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -136,7 +136,7 @@ class ActivityController extends BaseController
* tags={"actvities"},
* summary="Gets a PDF for the given activity",
* description="Gets a PDF for the given activity",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="activity_id",

View File

@ -114,8 +114,8 @@ class LoginController extends BaseController
* tags={"login"},
* summary="Attempts authentication",
* description="Returns a CompanyUser object on success",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-SECRET"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/include_static"),
@ -249,7 +249,7 @@ class LoginController extends BaseController
* tags={"refresh"},
* summary="Refreshes the dataset",
* description="Refreshes the dataset",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/include_static"),
@ -291,11 +291,11 @@ class LoginController extends BaseController
return response()->json(['message' => 'User found, but not attached to any companies, please see your administrator'], 400);
}
// $cu->first()->account->companies->each(function ($company) use ($cu, $request) {
// if ($company->tokens()->where('is_system', true)->count() == 0) {
// (new CreateCompanyToken($company, $cu->first()->user, $request->server('HTTP_USER_AGENT')))->handle();
// }
// });
$cu->first()->account->companies->each(function ($company) use ($cu, $request) {
if ($company->tokens()->where('is_system', true)->count() == 0) {
(new CreateCompanyToken($company, $cu->first()->user, $request->server('HTTP_USER_AGENT')))->handle();
}
});
if ($request->has('current_company') && $request->input('current_company') == 'true') {
$cu->where('company_id', $company_token->company_id);
@ -480,13 +480,13 @@ class LoginController extends BaseController
return $cu;
}
// if (auth()->user()->company_users()->count() != auth()->user()->tokens()->distinct('company_id')->count()) {
// auth()->user()->companies->each(function ($company) {
// if (!CompanyToken::where('user_id', auth()->user()->id)->where('company_id', $company->id)->exists()) {
// (new CreateCompanyToken($company, auth()->user(), 'Google_O_Auth'))->handle();
// }
// });
// }
if (auth()->user()->company_users()->count() != auth()->user()->tokens()->distinct('company_id')->count()) {
auth()->user()->companies->each(function ($company) {
if (!CompanyToken::where('user_id', auth()->user()->id)->where('company_id', $company->id)->exists()) {
(new CreateCompanyToken($company, auth()->user(), 'Google_O_Auth'))->handle();
}
});
}
$truth->setCompanyToken(CompanyToken::where('user_id', auth()->user()->id)->where('company_id', $set_company->id)->first());

View File

@ -127,7 +127,7 @@ class YodleeController extends BaseController
* tags={"yodlee"},
* summary="Processing webhooks from Yodlee",
* description="Notifies the system when a data point can be refreshed",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -55,7 +55,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Gets a list of bank_integrations",
* description="Lists all bank integrations",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -115,7 +115,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Shows a bank_integration",
* description="Displays a bank_integration by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -170,7 +170,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Shows a bank_integration for editing",
* description="Displays a bank_integration by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -225,7 +225,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Updates a bank_integration",
* description="Handles the updating of a bank_integration by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -283,7 +283,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Gets a new blank bank_integration object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -328,7 +328,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Adds a bank_integration",
* description="Adds an bank_integration to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -375,7 +375,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Deletes a bank_integration",
* description="Handles the deletion of a bank_integration by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -428,7 +428,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Performs bulk actions on an array of bank_integrations",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -472,10 +472,12 @@ class BankIntegrationController extends BaseController
$ids = request()->input('ids');
$bank_integrations = BankIntegration::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()->get();
$bank_integrations = BankIntegration::withTrashed()->whereIn('id', $this->transformKeys($ids))
->company()
->cursor()
->each(function ($bank_integration, $key) use ($action) {
$bank_integrations->each(function ($bank_integration, $key) use ($action) {
$this->bank_integration_repo->{$action}($bank_integration);
$this->bank_integration_repo->{$action}($bank_integration);
});
/* Need to understand which permission are required for the given bulk action ie. view / edit */
@ -495,7 +497,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Gets the list of accounts from the remote server",
* description="Adds an bank_integration to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -586,7 +588,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Removes an account from the integration",
* description="Removes an account from the integration",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -643,7 +645,7 @@ class BankIntegrationController extends BaseController
* tags={"bank_integrations"},
* summary="Retrieve transactions for a account",
* description="Retrieve transactions for a account",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -59,7 +59,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Gets a list of bank_transactions",
* description="Lists all bank integrations",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -119,7 +119,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Shows a bank_transaction",
* description="Displays a bank_transaction by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -174,7 +174,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Shows a bank_transaction for editing",
* description="Displays a bank_transaction by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -229,7 +229,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Updates a bank_transaction",
* description="Handles the updating of a bank_transaction by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -287,7 +287,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Gets a new blank bank_transaction object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -332,7 +332,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Adds a bank_transaction",
* description="Adds an bank_transaction to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -379,7 +379,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Deletes a bank_transaction",
* description="Handles the deletion of a bank_transaction by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -432,7 +432,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Performs bulk actions on an array of bank_transations",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -508,7 +508,7 @@ class BankTransactionController extends BaseController
* tags={"bank_transactions"},
* summary="Performs match actions on an array of bank_transactions",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -62,7 +62,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Gets a list of bank_transaction_rules",
* description="Lists all bank transaction rules",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -122,7 +122,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Shows a bank_transaction",
* description="Displays a bank_transaction by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -177,7 +177,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Shows a bank_transaction for editing",
* description="Displays a bank_transaction by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -232,7 +232,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Updates a bank_transaction Rule",
* description="Handles the updating of a bank_transaction rule by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -290,7 +290,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Gets a new blank bank_transaction rule object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -335,7 +335,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Adds a bank_transaction rule",
* description="Adds an bank_transaction to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -382,7 +382,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Deletes a bank_transaction rule",
* description="Handles the deletion of a bank_transaction rule by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -435,7 +435,7 @@ class BankTransactionRuleController extends BaseController
* tags={"bank_transaction_rules"},
* summary="Performs bulk actions on an array of bank_transation rules",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -1031,6 +1031,11 @@ class BaseController extends Controller
public function flutterRoute()
{
if ((bool) $this->checkAppSetup() !== false && $account = Account::first()) {
//always redirect invoicing.co to invoicing.co
if(Ninja::isHosted() && (request()->getSchemeAndHttpHost() != 'https://invoicing.co'))
return redirect()->secure('https://invoicing.co');
if (config('ninja.require_https') && ! request()->isSecure()) {
return redirect()->secure(request()->getRequestUri());
}

View File

@ -30,7 +30,7 @@ class ChartController extends BaseController
* tags={"charts"},
* summary="Get chart data",
* description="Get chart data",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),

View File

@ -15,7 +15,6 @@ use App\Events\Client\ClientWasCreated;
use App\Events\Client\ClientWasUpdated;
use App\Factory\ClientFactory;
use App\Filters\ClientFilters;
use App\Http\Requests\Client\AdjustClientLedgerRequest;
use App\Http\Requests\Client\BulkClientRequest;
use App\Http\Requests\Client\CreateClientRequest;
use App\Http\Requests\Client\DestroyClientRequest;
@ -25,8 +24,6 @@ use App\Http\Requests\Client\ShowClientRequest;
use App\Http\Requests\Client\StoreClientRequest;
use App\Http\Requests\Client\UpdateClientRequest;
use App\Http\Requests\Client\UploadClientRequest;
use App\Jobs\Client\StoreClient;
use App\Jobs\Client\UpdateClient;
use App\Models\Account;
use App\Models\Client;
use App\Repositories\ClientRepository;
@ -36,7 +33,6 @@ use App\Utils\Traits\BulkOptions;
use App\Utils\Traits\MakesHash;
use App\Utils\Traits\SavesDocuments;
use App\Utils\Traits\Uploadable;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Storage;
@ -79,8 +75,8 @@ class ClientController extends BaseController
* summary="Gets a list of clients",
* description="Lists clients, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the clients, these are handled by the ClientFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* Query parameters can be added to performed more fine grained filtering of the clients, these are handled by the ClientFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -129,7 +125,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Shows a client",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -183,7 +179,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Shows a client for editting",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -238,7 +234,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Updates a client",
* description="Handles the updating of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -302,7 +298,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Gets a new blank client object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -347,7 +343,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Adds a client",
* description="Adds an client to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -404,7 +400,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Deletes a client",
* description="Handles the deletion of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -457,7 +453,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Performs bulk actions on an array of clients",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -528,7 +524,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Uploads a document to a client",
* description="Handles the uploading of a document to a client",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -591,7 +587,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Purges a client from the system",
* description="Handles purging a client",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -663,7 +659,7 @@ class ClientController extends BaseController
* tags={"clients"},
* summary="Merges two clients",
* description="Handles merging 2 clients",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -77,7 +77,7 @@ class ClientGatewayTokenController extends BaseController
* description="Lists client_gateway_tokens, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the client_gateway_tokens, these are handled by the ClientGatewayTokenFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -124,7 +124,7 @@ class ClientGatewayTokenController extends BaseController
* tags={"client_gateway_tokens"},
* summary="Shows a client",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -178,7 +178,7 @@ class ClientGatewayTokenController extends BaseController
* tags={"client_gateway_tokens"},
* summary="Shows a client for editting",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -233,7 +233,7 @@ class ClientGatewayTokenController extends BaseController
* tags={"client_gateway_tokens"},
* summary="Updates a client",
* description="Handles the updating of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -289,7 +289,7 @@ class ClientGatewayTokenController extends BaseController
* tags={"client_gateway_tokens"},
* summary="Gets a new blank client object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -336,7 +336,7 @@ class ClientGatewayTokenController extends BaseController
* tags={"client_gateway_tokens"},
* summary="Adds a client",
* description="Adds an client to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -384,7 +384,7 @@ class ClientGatewayTokenController extends BaseController
* tags={"client_gateway_tokens"},
* summary="Deletes a client",
* description="Handles the deletion of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -47,7 +47,7 @@ class ClientStatementController extends BaseController
* tags={"clients"},
* summary="Return a PDF of the client statement",
* description="Return a PDF of the client statement",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(

View File

@ -91,7 +91,7 @@ class CompanyController extends BaseController
* description="Lists companies, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the companies, these are handled by the CompanyFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -136,7 +136,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Gets a new blank company object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -181,7 +181,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Adds a company",
* description="Adds an company to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -264,7 +264,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Shows an company",
* description="Displays an company by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -318,7 +318,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Shows an company for editting",
* description="Displays an company by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -372,7 +372,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Updates an company",
* description="Handles the updating of an company by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -441,7 +441,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Deletes a company",
* description="Handles the deletion of an company by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -544,7 +544,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Uploads a document to a company",
* description="Handles the uploading of a document to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -607,7 +607,7 @@ class CompanyController extends BaseController
* tags={"companies"},
* summary="Sets the company as the default company.",
* description="Sets the company as the default company.",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -76,7 +76,7 @@ class CompanyGatewayController extends BaseController
* description="Lists company_gateways, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the company_gateways, these are handled by the CompanyGatewayFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -121,7 +121,7 @@ class CompanyGatewayController extends BaseController
* tags={"company_gateways"},
* summary="Gets a new blank CompanyGateway object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -166,7 +166,7 @@ class CompanyGatewayController extends BaseController
* tags={"company_gateways"},
* summary="Adds a CompanyGateway",
* description="Adds an CompanyGateway to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -230,7 +230,7 @@ class CompanyGatewayController extends BaseController
* tags={"company_gateways"},
* summary="Shows an CompanyGateway",
* description="Displays an CompanyGateway by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -284,7 +284,7 @@ class CompanyGatewayController extends BaseController
* tags={"company_gateways"},
* summary="Shows an CompanyGateway for editting",
* description="Displays an CompanyGateway by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -338,7 +338,7 @@ class CompanyGatewayController extends BaseController
* tags={"company_gateways"},
* summary="Updates an CompanyGateway",
* description="Handles the updating of an CompanyGateway by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -403,7 +403,7 @@ class CompanyGatewayController extends BaseController
* tags={"company_gateways"},
* summary="Deletes a CompanyGateway",
* description="Handles the deletion of an CompanyGateway by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -459,7 +459,7 @@ class CompanyGatewayController extends BaseController
* tags={"company_gateways"},
* summary="Performs bulk actions on an array of company_gateways",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -39,7 +39,7 @@ class CompanyLedgerController extends BaseController
* tags={"company_ledger"},
* summary="Gets a list of company_ledger",
* description="Lists the company_ledger.",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -50,7 +50,7 @@ class ConnectedAccountController extends BaseController
* tags={"connected_account"},
* summary="Connect an oauth user to an existing user",
* description="Refreshes the dataset",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/include_static"),

View File

@ -79,7 +79,7 @@ class CreditController extends BaseController
* description="Lists credits, search and filters allow fine grained lists to be generated.
*
* Query parameters can be added to performed more fine grained filtering of the credits, these are handled by the CreditFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -124,7 +124,7 @@ class CreditController extends BaseController
* tags={"credits"},
* summary="Gets a new blank credit object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -169,7 +169,7 @@ class CreditController extends BaseController
* tags={"credits"},
* summary="Adds a credit",
* description="Adds an credit to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -229,7 +229,7 @@ class CreditController extends BaseController
* tags={"credits"},
* summary="Shows an credit",
* description="Displays an credit by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -283,7 +283,7 @@ class CreditController extends BaseController
* tags={"credits"},
* summary="Shows an credit for editting",
* description="Displays an credit by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -338,7 +338,7 @@ class CreditController extends BaseController
* tags={"Credits"},
* summary="Updates an Credit",
* description="Handles the updating of an Credit by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -405,7 +405,7 @@ class CreditController extends BaseController
* tags={"credits"},
* summary="Deletes a credit",
* description="Handles the deletion of an credit by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -457,7 +457,7 @@ class CreditController extends BaseController
* tags={"credits"},
* summary="Performs bulk actions on an array of credits",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -649,7 +649,7 @@ class CreditController extends BaseController
* tags={"quotes"},
* summary="Download a specific credit by invitation key",
* description="Downloads a specific quote",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -723,7 +723,7 @@ class CreditController extends BaseController
* tags={"credits"},
* summary="Uploads a document to a credit",
* description="Handles the uploading of a document to a credit",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -59,7 +59,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Gets a list of designs",
* description="Lists designs",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -106,7 +106,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Shows a design",
* description="Displays a design by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -160,7 +160,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Shows a design for editting",
* description="Displays a design by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -215,7 +215,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Updates a design",
* description="Handles the updating of a design by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -276,7 +276,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Gets a new blank design object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -321,7 +321,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Adds a design",
* description="Adds an design to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -419,7 +419,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Deletes a design",
* description="Handles the deletion of a design by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -476,7 +476,7 @@ class DesignController extends BaseController
* tags={"designs"},
* summary="Performs bulk actions on an array of designs",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -47,7 +47,7 @@ class DocumentController extends BaseController
* description="Lists documents, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the documents, these are handled by the DocumentsFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),

View File

@ -104,7 +104,7 @@ class ExpenseCategoryController extends BaseController
* tags={"expense_categories"},
* summary="Gets a new blank Expens Category object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Response(
* response=200,
@ -149,7 +149,7 @@ class ExpenseCategoryController extends BaseController
* tags={"expense_categories"},
* summary="Adds a expense category",
* description="Adds an expense category to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -196,7 +196,7 @@ class ExpenseCategoryController extends BaseController
* tags={"expense_categories"},
* summary="Shows a Expens Category",
* description="Displays an ExpenseCategory by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -249,7 +249,7 @@ class ExpenseCategoryController extends BaseController
* tags={"expense_categories"},
* summary="Shows a Expens Category for editting",
* description="Displays a Expens Category by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -303,7 +303,7 @@ class ExpenseCategoryController extends BaseController
* tags={"expense_categories"},
* summary="Updates a tax rate",
* description="Handles the updating of a tax rate by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -360,7 +360,7 @@ class ExpenseCategoryController extends BaseController
* tags={"expense_categories"},
* summary="Deletes a ExpenseCategory",
* description="Handles the deletion of an ExpenseCategory by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -414,7 +414,7 @@ class ExpenseCategoryController extends BaseController
* tags={"expense_categories"},
* summary="Performs bulk actions on an array of ExpenseCategorys",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -74,7 +74,7 @@ class ExpenseController extends BaseController
* description="Lists expenses, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the expenses, these are handled by the ExpenseFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -121,7 +121,7 @@ class ExpenseController extends BaseController
* tags={"expenses"},
* summary="Shows a client",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -175,7 +175,7 @@ class ExpenseController extends BaseController
* tags={"expenses"},
* summary="Shows a client for editting",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -230,7 +230,7 @@ class ExpenseController extends BaseController
* tags={"expenses"},
* summary="Updates a client",
* description="Handles the updating of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -296,7 +296,7 @@ class ExpenseController extends BaseController
* tags={"expenses"},
* summary="Gets a new blank client object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -341,7 +341,7 @@ class ExpenseController extends BaseController
* tags={"expenses"},
* summary="Adds a client",
* description="Adds an client to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -391,7 +391,7 @@ class ExpenseController extends BaseController
* tags={"expenses"},
* summary="Deletes a client",
* description="Handles the deletion of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -444,7 +444,7 @@ class ExpenseController extends BaseController
* tags={"expenses"},
* summary="Performs bulk actions on an array of expenses",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -523,7 +523,7 @@ class ExpenseController extends BaseController
* tags={"expense"},
* summary="Uploads a document to a expense",
* description="Handles the uploading of a document to a expense",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -64,7 +64,7 @@ class GroupSettingController extends BaseController
* description="Lists group_settings, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the group_settings, these are handled by the GroupSettingFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -109,7 +109,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Gets a new blank GroupSetting object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -154,7 +154,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Adds a GroupSetting",
* description="Adds an GroupSetting to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -206,7 +206,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Shows an GroupSetting",
* description="Displays an GroupSetting by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -260,7 +260,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Shows an GroupSetting for editting",
* description="Displays an GroupSetting by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -314,7 +314,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Updates an GroupSetting",
* description="Handles the updating of an GroupSetting by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -377,7 +377,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Deletes a GroupSetting",
* description="Handles the deletion of an GroupSetting by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -429,7 +429,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Performs bulk actions on an array of group_settings",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -508,7 +508,7 @@ class GroupSettingController extends BaseController
* tags={"group_settings"},
* summary="Uploads a document to a group setting",
* description="Handles the uploading of a document to a group setting",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -35,7 +35,7 @@ class ImportController extends Controller
* tags={"imports"},
* summary="Pre Import checks - returns a reference to the job and the headers of the CSV",
* description="Pre Import checks - returns a reference to the job and the headers of the CSV",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(

View File

@ -33,7 +33,7 @@ class AppleController extends BaseController
* tags={"postmark"},
* summary="Processing webhooks from Apple for in app purchases",
* description="Adds an credit to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -72,7 +72,7 @@ class AppleController extends BaseController
* tags={"postmark"},
* summary="Processing event webhooks from Apple for in purchase / subscription status update",
* description="Adds an credit to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -98,7 +98,7 @@ class InvoiceController extends BaseController
* description="Lists invoices, search and filters allow fine grained lists to be generated.
*
* Query parameters can be added to performed more fine grained filtering of the invoices, these are handled by the InvoiceFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -144,7 +144,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Gets a new blank invoice object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -189,7 +189,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Adds a invoice",
* description="Adds an invoice to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(
@ -257,7 +257,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Shows an invoice",
* description="Displays an invoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -311,7 +311,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Shows an invoice for editting",
* description="Displays an invoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -366,7 +366,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Updates an invoice",
* description="Handles the updating of an invoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -440,7 +440,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Deletes a invoice",
* description="Handles the deletion of an invoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -492,7 +492,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Performs bulk actions on an array of invoices",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -619,7 +619,7 @@ class InvoiceController extends BaseController
* - archive
* - delete
* - email",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -807,7 +807,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Download a specific invoice by invitation key",
* description="Downloads a specific invoice",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -874,7 +874,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Download a specific invoice delivery notes",
* description="Downloads a specific invoice delivery notes",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -934,7 +934,7 @@ class InvoiceController extends BaseController
* tags={"invoices"},
* summary="Uploads a document to a invoice",
* description="Handles the uploading of a document to a invoice",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -31,7 +31,7 @@ class LogoutController extends BaseController
* tags={"logout"},
* summary="Gets a list of logout",
* description="Lists all logout",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),

View File

@ -46,7 +46,7 @@ class MigrationController extends BaseController
* tags={"migration"},
* summary="Attempts to purge a company record and all its child records",
* description="Attempts to purge a company record and all its child records",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="company",
@ -136,7 +136,7 @@ class MigrationController extends BaseController
* tags={"migration"},
* summary="Attempts to purge a companies child records but save the company record and its settings",
* description="Attempts to purge a companies child records but save the company record and its settings",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="company",
@ -179,6 +179,7 @@ class MigrationController extends BaseController
$company->tasks()->forceDelete();
$company->vendors()->forceDelete();
$company->expenses()->forceDelete();
$company->purchase_orders()->forceDelete();
$company->bank_transaction_rules()->forceDelete();
$company->bank_transactions()->forceDelete();
// $company->bank_integrations()->forceDelete();
@ -219,9 +220,9 @@ class MigrationController extends BaseController
* tags={"migration"},
* summary="Starts the migration from previous version of Invoice Ninja",
* description="Starts the migration from previous version of Invoice Ninja",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Password"),
* @OA\Parameter(ref="#/components/parameters/X-API-PASSWORD"),
* @OA\Parameter(
* name="migration",
* in="query",

View File

@ -1,10 +1,11 @@
<?php
/**
* @OA\Parameter(
* name="X-Api-Secret",
* name="X-API-SECRET",
* in="header",
* description="The API secret as defined by the .env variable API_SECRET",
* required=true,
* description="The API secret as defined by the .env variable API_SECRET, only needed for self hosted users, and only required on the login route if the .env parameter has been set.",
* required=false,
* @OA\Schema(
* type="string",
* example="password"
@ -24,20 +25,20 @@
* ),
*
* @OA\Parameter(
* name="X-Api-Token",
* name="X-API-TOKEN",
* in="header",
* description="The API token to be used for authentication",
* required=true,
* @OA\Schema(
* type="string",
* example="HcRvs0oCvYbY5g3RzgBZrSBOChCiq8u4AL0ieuFN5gn4wUV14t0clVhfPc5OX99q"
* example="TOKEN"
* )
* ),
* @OA\Parameter(
* name="X-Api-Password",
* name="X-API-PASSWORD",
* in="header",
* description="The login password when challenged",
* required=true,
* description="The login password when challenged on certain protected routes",
* required=false,
* @OA\Schema(
* type="string",
* example="supersecretpassword"
@ -47,10 +48,11 @@
* @OA\Parameter(
* name="include",
* in="query",
* description="Includes child relationships in the response, format is comma separated",
* description="Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes",
* required=false,
* @OA\Schema(
* type="string",
* example="clients,invoices"
* example=""
* )
* ),
*
@ -58,9 +60,10 @@
* name="include_static",
* in="query",
* description="Returns static variables",
* required=false,
* @OA\Schema(
* type="string",
* example="include_static=true"
* example="include_static=true",
* )
* ),
*
@ -68,6 +71,7 @@
* name="clear_cache",
* in="query",
* description="Clears the static cache",
* required=false,
* @OA\Schema(
* type="string",
* example="clear_cache=true"
@ -78,6 +82,7 @@
* name="index",
* in="query",
* description="Replaces the default response index from data to a user specific string",
* required=false,
* @OA\Schema(
* type="string",
* example="user"
@ -88,6 +93,7 @@
* name="api_version",
* in="query",
* description="The API version",
* required=false,
* @OA\Schema(
* type="number",
* example="user"

View File

@ -1,11 +1,12 @@
<?php
/**
* @OA\OpenApi(
* @OA\Info(
* version="1.0.30",
* title="Invoice Ninja",
* description="Invoice Ninja. Open Source Invoicing lives here. ",
* termsOfService="http://swagger.io/terms/",
* description="Invoice Ninja. Self hosted Invoicing lives here. ",
* termsOfService="https://invoiceninja.github.io/docs/legal/terms_of_service/#page-content",
* @OA\Contact(
* email="contact@invoiceninja.com"
* ),
@ -15,8 +16,8 @@
* ),
* ),
* @OA\Server(
* description="Example InvoiceNinja base url",
* url="https://ninja.test",
* description="Demo API Server InvoiceNinja, you can use the demo API key `TOKEN` to test the endpoints.",
* url="https://demo.invoiceninja.com",
* ),
* @OA\ExternalDocumentation(
* description="https://invoiceninja.github.io",

View File

@ -80,7 +80,7 @@ class PaymentController extends BaseController
* description="Lists payments, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the payments, these are handled by the PaymentFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -126,7 +126,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Gets a new blank Payment object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -172,7 +172,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Adds a Payment",
* description="Adds an Payment to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(
@ -225,7 +225,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Shows an Payment",
* description="Displays an Payment by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -280,7 +280,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Shows an Payment for editting",
* description="Displays an Payment by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -335,7 +335,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Updates an Payment",
* description="Handles the updating of an Payment by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -401,7 +401,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Deletes a Payment",
* description="Handles the deletion of an Payment by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -454,7 +454,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Performs bulk actions on an array of payments",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -531,7 +531,7 @@ class PaymentController extends BaseController
- archive
- delete
- email",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -643,7 +643,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Adds a Refund",
* description="Adds an Refund to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(
@ -696,7 +696,7 @@ class PaymentController extends BaseController
* tags={"payments"},
* summary="Uploads a document to a payment",
* description="Handles the uploading of a document to a payment",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -48,7 +48,7 @@ class PaymentTermController extends BaseController
* tags={"payment_terms"},
* summary="Gets a list of payment terms",
* description="Lists payment terms",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -95,7 +95,7 @@ class PaymentTermController extends BaseController
* tags={"payment_terms"},
* summary="Gets a new blank PaymentTerm object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -141,7 +141,7 @@ class PaymentTermController extends BaseController
* tags={"payment_terms"},
* summary="Adds a Payment",
* description="Adds a Payment Term to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(
@ -186,7 +186,7 @@ class PaymentTermController extends BaseController
* tags={"payment_terms"},
* summary="Shows a Payment Term",
* description="Displays an Payment Term by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -236,7 +236,7 @@ class PaymentTermController extends BaseController
* tags={"payment_terms"},
* summary="Shows an Payment Term for editting",
* description="Displays an Payment Term by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -294,7 +294,7 @@ class PaymentTermController extends BaseController
* tags={"payment_terms"},
* summary="Updates a Payment Term",
* description="Handles the updating of an Payment Termby id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -353,7 +353,7 @@ class PaymentTermController extends BaseController
* tags={"payment_termss"},
* summary="Deletes a Payment Term",
* description="Handles the deletion of an PaymentTerm by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -406,7 +406,7 @@ class PaymentTermController extends BaseController
* tags={"payment_terms"},
* summary="Performs bulk actions on an array of payment terms",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -47,7 +47,7 @@ class PostMarkController extends BaseController
* tags={"postmark"},
* summary="Processing webhooks from PostMark",
* description="Adds an credit to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -60,7 +60,7 @@ class ProductController extends BaseController
* description="Lists products, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the products, these are handled by the ProductFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -106,7 +106,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Gets a new blank Product object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -151,7 +151,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Adds a Product",
* description="Adds an Product to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -196,7 +196,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Shows an Product",
* description="Displays an Product by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -249,7 +249,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Shows an Product for editting",
* description="Displays an Product by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -303,7 +303,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Updates an Product",
* description="Handles the updating of an Product by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -364,7 +364,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Deletes a Product",
* description="Handles the deletion of an Product by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -417,7 +417,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Performs bulk actions on an array of products",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -488,7 +488,7 @@ class ProductController extends BaseController
* tags={"products"},
* summary="Uploads a document to a product",
* description="Handles the uploading of a document to a product",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -63,7 +63,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Gets a list of projects",
* description="Lists projects",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -110,7 +110,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Shows a project",
* description="Displays a project by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -164,7 +164,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Shows a project for editting",
* description="Displays a project by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -219,7 +219,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Updates a project",
* description="Handles the updating of a project by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -287,7 +287,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Gets a new blank project object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -332,7 +332,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Adds a project",
* description="Adds an project to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -391,7 +391,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Deletes a project",
* description="Handles the deletion of a project by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -447,7 +447,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Performs bulk actions on an array of projects",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -517,7 +517,7 @@ class ProjectController extends BaseController
* tags={"projects"},
* summary="Uploads a document to a project",
* description="Handles the uploading of a document to a project",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -17,6 +17,7 @@ use App\Events\PurchaseOrder\PurchaseOrderWasUpdated;
use App\Factory\PurchaseOrderFactory;
use App\Filters\PurchaseOrderFilters;
use App\Http\Requests\PurchaseOrder\ActionPurchaseOrderRequest;
use App\Http\Requests\PurchaseOrder\BulkPurchaseOrderRequest;
use App\Http\Requests\PurchaseOrder\CreatePurchaseOrderRequest;
use App\Http\Requests\PurchaseOrder\DestroyPurchaseOrderRequest;
use App\Http\Requests\PurchaseOrder\EditPurchaseOrderRequest;
@ -71,7 +72,7 @@ class PurchaseOrderController extends BaseController
* description="Lists purchase orders, search and filters allow fine grained lists to be generated.
*
* Query parameters can be added to performed more fine grained filtering of the purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -115,7 +116,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Gets a new blank purchase order object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -159,7 +160,7 @@ class PurchaseOrderController extends BaseController
* tags={"purhcase_orders"},
* summary="Adds a purchase order",
* description="Adds an purchase order to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -212,7 +213,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Shows an purcase orders",
* description="Displays an purchase order by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -265,7 +266,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Shows an purchase order for editting",
* description="Displays an purchase order by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -319,7 +320,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Updates an purchase order",
* description="Handles the updating of an purchase order by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -385,7 +386,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Deletes a purchase order",
* description="Handles the deletion of an purchase orders by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -437,7 +438,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Performs bulk actions on an array of purchase_orders",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -475,12 +476,12 @@ class PurchaseOrderController extends BaseController
* ),
* )
*/
public function bulk()
public function bulk(BulkPurchaseOrderRequest $request)
{
$action = request()->input('action');
$action = $request->input('action');
$ids = request()->input('ids');
$ids = $request->input('ids');
if(Ninja::isHosted() && (stripos($action, 'email') !== false) && !auth()->user()->company()->account->account_sms_verified)
return response(['message' => 'Please verify your account to send emails.'], 400);
@ -497,7 +498,6 @@ class PurchaseOrderController extends BaseController
if ($action == 'bulk_download' && $purchase_orders->count() >= 1) {
$purchase_orders->each(function ($purchase_order) {
if (auth()->user()->cannot('view', $purchase_order)) {
nlog("access denied");
return response()->json(['message' => ctrans('text.access_denied')]);
}
});
@ -549,7 +549,7 @@ class PurchaseOrderController extends BaseController
* - archive
* - delete
* - email",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -714,7 +714,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Uploads a document to a purchase_orders",
* description="Handles the uploading of a document to a purchase_order",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -770,7 +770,7 @@ class PurchaseOrderController extends BaseController
* tags={"purchase_orders"},
* summary="Download a specific purchase order by invitation key",
* description="Downloads a specific purchase order",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -95,7 +95,7 @@ class QuoteController extends BaseController
* description="Lists quotes, search and filters allow fine grained lists to be generated.
*
* Query parameters can be added to performed more fine grained filtering of the quotes, these are handled by the QuoteFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -139,7 +139,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Gets a new blank Quote object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -185,7 +185,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Adds a Quote",
* description="Adds an Quote to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -240,7 +240,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Shows an Quote",
* description="Displays an Quote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -295,7 +295,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Shows an Quote for editting",
* description="Displays an Quote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -350,7 +350,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Updates an Quote",
* description="Handles the updating of an Quote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -418,7 +418,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Deletes a Quote",
* description="Handles the deletion of an Quote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -471,7 +471,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Performs bulk actions on an array of quotes",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -627,7 +627,7 @@ class QuoteController extends BaseController
- convert
- convert_to_invoice
- email",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -786,7 +786,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Download a specific quote by invitation key",
* description="Downloads a specific quote",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -862,7 +862,7 @@ class QuoteController extends BaseController
* tags={"quotes"},
* summary="Uploads a document to a quote",
* description="Handles the uploading of a document to a quote",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -74,7 +74,7 @@ class RecurringExpenseController extends BaseController
* description="Lists recurring_expenses, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the recurring_expenses, these are handled by the RecurringExpenseFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -121,7 +121,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expenses"},
* summary="Shows a client",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -175,7 +175,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expenses"},
* summary="Shows a client for editting",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -230,7 +230,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expenses"},
* summary="Updates a client",
* description="Handles the updating of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -295,7 +295,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expenses"},
* summary="Gets a new blank client object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -340,7 +340,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expenses"},
* summary="Adds a client",
* description="Adds an client to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -389,7 +389,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expenses"},
* summary="Deletes a client",
* description="Handles the deletion of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -442,7 +442,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expenses"},
* summary="Performs bulk actions on an array of recurring_expenses",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -559,7 +559,7 @@ class RecurringExpenseController extends BaseController
* tags={"recurring_expense"},
* summary="Uploads a document to a recurring_expense",
* description="Handles the uploading of a document to a recurring_expense",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -81,7 +81,7 @@ class RecurringInvoiceController extends BaseController
* description="Lists recurring_invoices, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the recurring_invoices, these are handled by the RecurringInvoiceFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -127,7 +127,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Gets a new blank RecurringInvoice object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -173,7 +173,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Adds a RecurringInvoice",
* description="Adds an RecurringInvoice to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -225,7 +225,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Shows an RecurringInvoice",
* description="Displays an RecurringInvoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -280,7 +280,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Shows an RecurringInvoice for editting",
* description="Displays an RecurringInvoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -335,7 +335,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Updates an RecurringInvoice",
* description="Handles the updating of an RecurringInvoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -404,7 +404,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Deletes a RecurringInvoice",
* description="Handles the deletion of an RecurringInvoice by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -452,7 +452,7 @@ class RecurringInvoiceController extends BaseController
* tags={"invoices"},
* summary="Download a specific invoice by invitation key",
* description="Downloads a specific invoice",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -513,7 +513,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Performs bulk actions on an array of recurring_invoices",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -590,7 +590,7 @@ class RecurringInvoiceController extends BaseController
- archive
- delete
- email",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -717,7 +717,7 @@ class RecurringInvoiceController extends BaseController
* tags={"recurring_invoices"},
* summary="Uploads a document to a recurring_invoice",
* description="Handles the uploading of a document to a recurring_invoice",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -77,7 +77,7 @@ class RecurringQuoteController extends BaseController
* description="Lists recurring_quotes, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the recurring_quotes, these are handled by the RecurringQuoteFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -122,7 +122,7 @@ class RecurringQuoteController extends BaseController
* tags={"recurring_quotes"},
* summary="Gets a new blank RecurringQuote object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -167,7 +167,7 @@ class RecurringQuoteController extends BaseController
* tags={"recurring_quotes"},
* summary="Adds a RecurringQuote",
* description="Adds an RecurringQuote to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -213,7 +213,7 @@ class RecurringQuoteController extends BaseController
* tags={"recurring_quotes"},
* summary="Shows an RecurringQuote",
* description="Displays an RecurringQuote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -268,7 +268,7 @@ class RecurringQuoteController extends BaseController
* tags={"recurring_quotes"},
* summary="Shows an RecurringQuote for editting",
* description="Displays an RecurringQuote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -323,7 +323,7 @@ class RecurringQuoteController extends BaseController
* tags={"recurring_quotes"},
* summary="Updates an RecurringQuote",
* description="Handles the updating of an RecurringQuote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -385,7 +385,7 @@ class RecurringQuoteController extends BaseController
* tags={"recurring_quotes"},
* summary="Deletes a RecurringQuote",
* description="Handles the deletion of an RecurringQuote by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -438,7 +438,7 @@ class RecurringQuoteController extends BaseController
* tags={"recurring_quotes"},
* summary="Performs bulk actions on an array of recurring_quotes",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -516,7 +516,7 @@ class RecurringQuoteController extends BaseController
- archive
- delete
- email",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -46,8 +46,8 @@ class SelfUpdateController extends BaseController
* tags={"update"},
* summary="Performs a system update",
* description="Performs a system update",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Password"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-API-PASSWORD"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -36,7 +36,7 @@ class StaticController extends BaseController
* summary="Gets a list of statics",
* description="Lists all statics",
*
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -70,14 +70,19 @@ class StripeConnectController extends BaseController
{
\Stripe\Stripe::setApiKey(config('ninja.ninja_stripe_key'));
if($request->has('error') && $request->error == 'access_denied'){
return view('auth.connect.access_denied');
}
try {
$response = \Stripe\OAuth::token([
'grant_type' => 'authorization_code',
'code' => $request->input('code'),
]);
} catch (\Exception $e) {
nlog($e->getMessage());
throw new SystemError($e->getMessage(), 500);
return view('auth.connect.access_denied');
}
MultiDB::findAndSetDbByCompanyKey($request->getTokenContent()['company_key']);

View File

@ -57,7 +57,7 @@ class SubscriptionController extends BaseController
* summary="Gets a list of subscriptions",
* description="Lists subscriptions.",
*
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -101,7 +101,7 @@ class SubscriptionController extends BaseController
* tags={"subscriptions"},
* summary="Gets a new blank subscriptions object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -146,7 +146,7 @@ class SubscriptionController extends BaseController
* tags={"subscriptions"},
* summary="Adds a subscriptions",
* description="Adds an subscriptions to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -194,7 +194,7 @@ class SubscriptionController extends BaseController
* tags={"subscriptions"},
* summary="Shows an subscriptions",
* description="Displays an subscriptions by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -248,7 +248,7 @@ class SubscriptionController extends BaseController
* tags={"subscriptions"},
* summary="Shows an subscriptions for editting",
* description="Displays an subscriptions by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -303,7 +303,7 @@ class SubscriptionController extends BaseController
* tags={"subscriptions"},
* summary="Updates an subscriptions",
* description="Handles the updating of an subscriptions by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -366,7 +366,7 @@ class SubscriptionController extends BaseController
* tags={"subscriptions"},
* summary="Deletes a subscriptions",
* description="Handles the deletion of an subscriptions by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -419,7 +419,7 @@ class SubscriptionController extends BaseController
* tags={"subscriptions"},
* summary="Performs bulk actions on an array of subscriptions",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -18,7 +18,7 @@ class SendingController extends Controller
* tags={"support"},
* summary="Sends a support message to Invoice Ninja team",
* description="Allows a user to send a support message to the Invoice Ninja Team",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\RequestBody(
* description="The message",

View File

@ -33,7 +33,7 @@ class SystemLogController extends BaseController
* description="Lists system logs, search and filters allow fine grained lists to be generated.
*
* Query parameters can be added to performed more fine grained filtering of the system logs, these are handled by the SystemLogFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -112,7 +112,7 @@ class SystemLogController extends BaseController
* tags={"system_logs"},
* summary="Shows a system_logs",
* description="Displays a system_logs by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -75,7 +75,7 @@ class TaskController extends BaseController
* description="Lists tasks, search and filters allow fine grained lists to be generated.
*
* Query parameters can be added to performed more fine grained filtering of the tasks, these are handled by the TaskFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -122,7 +122,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Shows a client",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -176,7 +176,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Shows a client for editting",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -231,7 +231,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Updates a client",
* description="Handles the updating of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -302,7 +302,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Gets a new blank client object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -347,7 +347,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Adds a client",
* description="Adds an client to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -399,7 +399,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Deletes a client",
* description="Handles the deletion of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -453,7 +453,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Performs bulk actions on an array of tasks",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -532,7 +532,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Uploads a document to a task",
* description="Handles the uploading of a document to a task",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -594,7 +594,7 @@ class TaskController extends BaseController
* tags={"tasks"},
* summary="Sort tasks on KanBan",
* description="Sorts tasks after drag and drop on the KanBan.",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(

View File

@ -83,7 +83,7 @@ class TaskSchedulerController extends BaseController
* tags={"task_schedulers"},
* summary="Gets a new blank scheduler object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -122,7 +122,7 @@ class TaskSchedulerController extends BaseController
* summary="Create task scheduler with job ",
* description="Create task scheduler with a job (action(job) request should be sent via request also. Example: We want client report to be job which will be run
* multiple times, we should send the same parameters in the request as we would send if we wanted to get report, see example",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-API-SECRET"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\RequestBody(
* required=true,
@ -199,7 +199,7 @@ class TaskSchedulerController extends BaseController
* tags={"task_schedulers"},
* summary="Update task scheduler ",
* description="Update task scheduler",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-API-SECRET"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -294,7 +294,7 @@ class TaskSchedulerController extends BaseController
* tags={"task_schedulers"},
* summary="Performs bulk actions on an array of task_schedulers",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Factory\TaskStatusFactory;
use App\Filters\TaskStatusFilters;
use App\Http\Requests\TaskStatus\ActionTaskStatusRequest;
use App\Http\Requests\TaskStatus\CreateTaskStatusRequest;
use App\Http\Requests\TaskStatus\DestroyTaskStatusRequest;
use App\Http\Requests\TaskStatus\ShowTaskStatusRequest;
@ -49,7 +50,7 @@ class TaskStatusController extends BaseController
* tags={"task_status"},
* summary="Gets a list of task statuses",
* description="Lists task statuses",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -96,7 +97,7 @@ class TaskStatusController extends BaseController
* tags={"task_status"},
* summary="Gets a new blank TaskStatus object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -142,7 +143,7 @@ class TaskStatusController extends BaseController
* tags={"task_status"},
* summary="Adds a TaskStatus",
* description="Adds a TaskStatusto the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(
@ -190,7 +191,7 @@ class TaskStatusController extends BaseController
* tags={"task_status"},
* summary="Shows a TaskStatus Term",
* description="Displays an TaskStatusby id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -240,7 +241,7 @@ class TaskStatusController extends BaseController
* tags={"task_status"},
* summary="Shows an TaskStatusfor editting",
* description="Displays an TaskStatusby id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -298,7 +299,7 @@ class TaskStatusController extends BaseController
* tags={"task_status"},
* summary="Updates a TaskStatus Term",
* description="Handles the updating of an TaskStatus Termby id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -357,7 +358,7 @@ class TaskStatusController extends BaseController
* tags={"task_statuss"},
* summary="Deletes a TaskStatus Term",
* description="Handles the deletion of an TaskStatus by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -410,7 +411,7 @@ class TaskStatusController extends BaseController
* tags={"task_status"},
* summary="Performs bulk actions on an array of task statuses",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -449,18 +450,20 @@ class TaskStatusController extends BaseController
* ),
* )
*/
public function bulk()
public function bulk(ActionTaskStatusRequest $request)
{
$action = request()->input('action');
$action = $request->input('action');
$ids = request()->input('ids');
$ids = $request->input('ids');
$task_status = TaskStatus::withTrashed()->company()->find($this->transformKeys($ids));
TaskStatus::withTrashed()
->company()
->whereIn('id', $this->transformKeys($ids))
->cursor()
->each(function ($task_status, $key) use ($action) {
$task_status->each(function ($task_status, $key) use ($action) {
if (auth()->user()->can('edit', $task_status)) {
$this->task_status_repo->{$action}($task_status);
}
});
return $this->listResponse(TaskStatus::withTrashed()->whereIn('id', $this->transformKeys($ids)));

View File

@ -101,7 +101,7 @@ class TaxRateController extends BaseController
* tags={"tax_rates"},
* summary="Gets a new blank Tax Rate object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Response(
* response=200,
@ -160,7 +160,7 @@ class TaxRateController extends BaseController
* tags={"tax_rates"},
* summary="Shows a Tax Rate",
* description="Displays an TaxRate by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -213,7 +213,7 @@ class TaxRateController extends BaseController
* tags={"tax_rates"},
* summary="Shows a Tax Rate for editting",
* description="Displays a Tax Rate by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -267,7 +267,7 @@ class TaxRateController extends BaseController
* tags={"tax_rates"},
* summary="Updates a tax rate",
* description="Handles the updating of a tax rate by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -324,7 +324,7 @@ class TaxRateController extends BaseController
* tags={"tax_rates"},
* summary="Deletes a TaxRate",
* description="Handles the deletion of an TaxRate by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="id",
@ -378,7 +378,7 @@ class TaxRateController extends BaseController
* tags={"tax_rates"},
* summary="Performs bulk actions on an array of TaxRates",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -64,7 +64,7 @@ class TokenController extends BaseController
* description="Lists company tokens.
*
* Query parameters can be added to performed more fine grained filtering of the tokens, these are handled by the TokenFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -113,7 +113,7 @@ class TokenController extends BaseController
* tags={"tokens"},
* summary="Shows a token",
* description="Displays a token by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -167,7 +167,7 @@ class TokenController extends BaseController
* tags={"tokens"},
* summary="Shows a token for editting",
* description="Displays a token by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -224,7 +224,7 @@ class TokenController extends BaseController
* tags={"tokens"},
* summary="Updates a token",
* description="Handles the updating of a token by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -286,7 +286,7 @@ class TokenController extends BaseController
* tags={"tokens"},
* summary="Gets a new blank token object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -331,7 +331,7 @@ class TokenController extends BaseController
* tags={"tokens"},
* summary="Adds a token",
* description="Adds an token to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -379,7 +379,7 @@ class TokenController extends BaseController
* tags={"tokens"},
* summary="Deletes a token",
* description="Handles the deletion of a token by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -435,7 +435,7 @@ class TokenController extends BaseController
* tags={"tokens"},
* summary="Performs bulk actions on an array of tokens",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -86,7 +86,7 @@ class UserController extends BaseController
* description="Lists users, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the users, these are handled by the UserFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -130,7 +130,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Gets a new blank User object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -175,7 +175,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Adds a User",
* description="Adds an User to the system",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -231,7 +231,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Shows an User",
* description="Displays an User by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -285,7 +285,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Shows an User for editting",
* description="Displays an User by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -334,7 +334,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Updates an User",
* description="Handles the updating of an User by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -414,7 +414,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Deletes a User",
* description="Handles the deletion of an User by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -485,7 +485,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Performs bulk actions on an array of users",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -561,7 +561,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Detach an existing user to a company",
* description="Detach an existing user from a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -635,7 +635,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Reconfirm an existing user to a company",
* description="Reconfirm an existing user from a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -691,7 +691,7 @@ class UserController extends BaseController
* tags={"users"},
* summary="Reconfirm an existing user to a company",
* description="Reconfirm an existing user from a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -73,7 +73,7 @@ class VendorController extends BaseController
* description="Lists vendors, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the vendors, these are handled by the VendorFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -120,7 +120,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Shows a client",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -174,7 +174,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Shows a client for editting",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -229,7 +229,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Updates a client",
* description="Handles the updating of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -295,7 +295,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Gets a new blank client object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -340,7 +340,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Adds a client",
* description="Adds an client to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -394,7 +394,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Deletes a client",
* description="Handles the deletion of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -448,7 +448,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Performs bulk actions on an array of vendors",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(
@ -527,7 +527,7 @@ class VendorController extends BaseController
* tags={"vendors"},
* summary="Uploads a document to a vendor",
* description="Handles the uploading of a document to a vendor",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(

View File

@ -53,7 +53,7 @@ class WebhookController extends BaseController
* description="Lists Webhooks, search and filters allow fine grained lists to be generated.
*
* Query parameters can be added to performed more fine grained filtering of the Webhooks, these are handled by the WebhookFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(ref="#/components/parameters/index"),
@ -100,7 +100,7 @@ class WebhookController extends BaseController
* tags={"webhooks"},
* summary="Shows a Webhook",
* description="Displays a Webhook by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -154,7 +154,7 @@ class WebhookController extends BaseController
* tags={"webhooks"},
* summary="Shows a Webhook for editting",
* description="Displays a Webhook by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -209,7 +209,7 @@ class WebhookController extends BaseController
* tags={"webhooks"},
* summary="Updates a Webhook",
* description="Handles the updating of a Webhook by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -270,7 +270,7 @@ class WebhookController extends BaseController
* tags={"webhooks"},
* summary="Gets a new blank Webhook object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -317,7 +317,7 @@ class WebhookController extends BaseController
* tags={"webhooks"},
* summary="Adds a Webhook",
* description="Adds an Webhook to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
@ -380,7 +380,7 @@ class WebhookController extends BaseController
* tags={"Webhooks"},
* summary="Deletes a Webhook",
* description="Handles the deletion of a Webhook by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Parameter(
@ -434,7 +434,7 @@ class WebhookController extends BaseController
* tags={"webhooks"},
* summary="Performs bulk actions on an array of Webhooks",
* description="",
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/index"),
* @OA\RequestBody(

View File

@ -322,6 +322,7 @@ class BillingPortalPurchasev2 extends Component
'total' => $total,
'qty' => $qty,
'is_recurring' => true,
'product_image' => $p->product_image,
]);
}

View File

@ -50,7 +50,7 @@ class DocumentsTable extends Component
{
MultiDB::setDb($this->db);
$this->client = Client::with('company')->find($this->client_id);
$this->client = Client::withTrashed()->with('company')->find($this->client_id);
$this->company = $this->client->company;

View File

@ -29,7 +29,7 @@ class PaymentMethodsTable extends Component
{
MultiDB::setDb($this->db);
$this->client = Client::with('company')->find($this->client_id);
$this->client = Client::withTrashed()->with('company')->find($this->client_id);
$this->company = $this->client->company;
}

View File

@ -12,21 +12,16 @@
namespace App\Http\Requests\PurchaseOrder;
use App\Http\Requests\Request;
use App\Models\PurchaseOrder;
use App\Utils\Traits\MakesHash;
class ActionPurchaseOrderRequest extends Request
{
use MakesHash;
private $error_msg;
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
private $error_msg;
// private $invoice;
public function authorize() : bool
{

View File

@ -0,0 +1,38 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\Requests\PurchaseOrder;
use App\Http\Requests\Request;
class BulkPurchaseOrderRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize() : bool
{
return true;
}
public function rules()
{
return [
'ids' => 'required|bail|array|min:1',
'action' => 'in:archive,restore,delete,email,bulk_download,bulk_print,mark_sent,download,send_email,add_to_inventory,expense,cancel'
];
}
}

View File

@ -42,7 +42,7 @@ class GenericReportRequest extends Request
{
$input = $this->all();
if (! array_key_exists('date_range', $input)) {
if (! array_key_exists('date_range', $input) || $input['date_range'] == '') {
$input['date_range'] = 'all';
}

View File

@ -46,7 +46,7 @@ class ProductSalesReportRequest extends Request
{
$input = $this->all();
if (! array_key_exists('date_range', $input)) {
if (! array_key_exists('date_range', $input) || $input['date_range'] == '') {
$input['date_range'] = 'all';
}

View File

@ -42,7 +42,7 @@ class ProfitLossRequest extends Request
{
$input = $this->all();
if (! array_key_exists('date_range', $input)) {
if (! array_key_exists('date_range', $input) || $input['date_range'] == '') {
$input['date_range'] = 'all';
}

View File

@ -195,4 +195,56 @@ class Request extends FormRequest
public function prepareForValidation()
{
}
public function checkTimeLog(array $log): bool
{
if(count($log) == 0)
return true;
/*Get first value of all arrays*/
$result = array_column($log, 0);
/*Sort the array in ascending order*/
asort($result);
$new_array = [];
/*Rebuild the array in order*/
foreach($result as $key => $value)
$new_array[] = $log[$key];
/*Iterate through the array and perform checks*/
foreach($new_array as $key => $array)
{
/*Flag which helps us know if there is a NEXT timelog*/
$next = false;
/* If there are more than 1 time log in the array, ensure the last timestamp is not zero*/
if(count($new_array) >1 && $array[1] == 0)
return false;
/* Check if the start time is greater than the end time */
/* Ignore the last value for now, we'll do a separate check for this */
if($array[0] > $array[1] && $array[1] != 0)
return false;
/* Find the next time log value - if it exists */
if(array_key_exists($key+1, $new_array))
$next = $new_array[$key+1];
/* check the next time log and ensure the start time is GREATER than the end time of the previous record */
if($next && $next[0] < $array[1])
return false;
/* Get the last row of the timelog*/
$last_row = end($new_array);
/*If the last value is NOT zero, ensure start time is not GREATER than the endtime */
if($last_row[1] != 0 && $last_row[0] > $last_row[1])
return false;
return true;
}
}
}

View File

@ -53,6 +53,9 @@ class StoreTaskRequest extends Request
$fail('The '.$attribute.' - '.print_r($k,1).' is invalid. Unix timestamps only.');
}
if(!$this->checkTimeLog($values))
$fail('Please correct overlapping values');
}];

View File

@ -59,6 +59,9 @@ class UpdateTaskRequest extends Request
$fail('The '.$attribute.' - '.print_r($k,1).' is invalid. Unix timestamps only.');
}
if(!$this->checkTimeLog($values))
$fail('Please correct overlapping values');
}];
return $this->globalRules($rules);

View File

@ -24,4 +24,14 @@ class ActionTaskStatusRequest extends Request
{
return auth()->user()->isAdmin();
}
public function rules()
{
return [
'ids' => 'required|bail|array',
'action' => 'in:archive,restore,delete'
];
}
}

View File

@ -39,6 +39,8 @@ class StoreWebhookRequest extends Request
{
$input = $this->all();
if(!isset($input['rest_method']))
$input['rest_method'] = 'post';
// if(isset($input['headers']) && count($input['headers']) == 0)
// $input['headers'] = null;

View File

@ -44,6 +44,9 @@ class UpdateWebhookRequest extends Request
{
$input = $this->all();
if(!isset($input['rest_method']))
$input['rest_method'] = 'post';
// if(isset($input['headers']) && count($input['headers']) == 0)
// $input['headers'] = null;

View File

@ -13,6 +13,7 @@ namespace App\Jobs\Util;
use App\DataMapper\Analytics\MigrationFailure;
use App\DataMapper\CompanySettings;
use App\Exceptions\ClientHostedMigrationException;
use App\Exceptions\MigrationValidatorFailed;
use App\Exceptions\ProcessingMigrationArchiveFailed;
use App\Exceptions\ResourceDependencyMissing;
@ -106,6 +107,7 @@ class Import implements ShouldQueue
use CleanLineItems;
use Uploadable;
use SavesDocuments;
/**
* @var array
*/
@ -188,10 +190,10 @@ class Import implements ShouldQueue
$this->resources = $resources;
}
// public function middleware()
// {
// return [new WithoutOverlapping("only_one_migration_at_a_time_ever")];
// }
public function middleware()
{
return [(new WithoutOverlapping($this->user->account_id))];
}
/**
* Execute the job.
@ -581,18 +583,42 @@ class Import implements ShouldQueue
$validator = null;
}
private function testUserDbLocationSanity(array $data): bool
{
if(Ninja::isSelfHost())
return true;
$current_db = config('database.default');
$db1_count = User::on('db-ninja-01')->withTrashed()->whereIn('email', array_column($data, 'email'))->count();
$db2_count = User::on('db-ninja-02')->withTrashed()->whereIn('email', array_column($data, 'email'))->count();
MultiDB::setDb($current_db);
if($db2_count == 0 && $db1_count == 0)
return true;
if($db1_count >= 1 && $db2_count >= 1)
return false;
return true;
}
/**
* @param array $data
* @throws Exception
*/
private function processUsers(array $data): void
{
if(!$this->testUserDbLocationSanity($data))
throw new ClientHostedMigrationException('You have users that belong to different accounts registered in the system, please contact us to resolve.', 400);
User::unguard();
$rules = [
'*.first_name' => ['string'],
'*.last_name' => ['string'],
//'*.email' => ['distinct'],
'*.email' => ['distinct', 'email', new ValidUserForCompany()],
];
@ -748,7 +774,7 @@ class Import implements ShouldQueue
Client::reguard();
Client::with('contacts')->where('company_id', $this->company->id)->cursor()->each(function ($client){
Client::withTrashed()->with('contacts')->where('company_id', $this->company->id)->cursor()->each(function ($client){
$contact = $client->contacts->sortByDesc('is_primary')->first();
$contact->is_primary = true;
@ -1897,6 +1923,8 @@ class Import implements ShouldQueue
{
info('the job failed');
config(['queue.failed.driver' => null]);
$job_failure = new MigrationFailure();
$job_failure->string_metric5 = get_class($this);
$job_failure->string_metric6 = $exception->getMessage();
@ -1951,7 +1979,6 @@ class Import implements ShouldQueue
}
/* In V4 we use negative invoices (credits) and add then into the client balance. In V5, these sit off ledger and are applied later.
This next section will check for credit balances and reduce the client balance so that the V5 balances are correct
*/

View File

@ -11,6 +11,7 @@
namespace App\Jobs\Util;
use App\Exceptions\ClientHostedMigrationException;
use App\Exceptions\MigrationValidatorFailed;
use App\Exceptions\NonExistingMigrationFile;
use App\Exceptions\ProcessingMigrationArchiveFailed;
@ -126,7 +127,7 @@ class StartMigration implements ShouldQueue
App::forgetInstance('translator');
$t = app('translator');
$t->replace(Ninja::transformTranslations($this->company->settings));
} catch (NonExistingMigrationFile | ProcessingMigrationArchiveFailed | ResourceNotAvailableForMigration | MigrationValidatorFailed | ResourceDependencyMissing | \Exception $e) {
} catch (ClientHostedMigrationException | NonExistingMigrationFile | ProcessingMigrationArchiveFailed | ResourceNotAvailableForMigration | MigrationValidatorFailed | ResourceDependencyMissing | \Exception $e) {
$this->company->update_products = $update_product_flag;
$this->company->save();

View File

@ -138,6 +138,17 @@ class InvoiceEmailEngine extends BaseEmailEngine
if ($this->client->getSetting('document_email_attachment') !== false && $this->invoice->company->account->hasFeature(Account::FEATURE_DOCUMENTS)) {
if($this->invoice->recurring_invoice()->exists())
{
foreach ($this->invoice->recurring_invoice->documents as $document) {
if($document->size > $this->max_attachment_size)
$this->setAttachmentLinks(["<a class='doc_links' href='" . URL::signedRoute('documents.public_download', ['document_hash' => $document->hash]) ."'>". $document->name ."</a>"]);
else
$this->setAttachments([['file' => base64_encode($document->getFile()), 'path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
}
}
// Storage::url
foreach ($this->invoice->documents as $document) {

View File

@ -1,7 +1,18 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Mail;
use App\Exceptions\ClientHostedMigrationException;
use App\Models\Company;
use Illuminate\Mail\Mailable;
use Illuminate\Support\Facades\App;
@ -38,10 +49,16 @@ class MigrationFailed extends Mailable
{
App::setLocale($this->company->getLocale());
$special_message = '';
if($this->exception instanceof ClientHostedMigrationException)
$special_message = $this->content;
return $this
->from(config('mail.from.address'), config('mail.from.name'))
->text('email.migration.failed_text')
->view('email.migration.failed', [
'special_message' => $special_message,
'logo' => $this->company->present()->logo(),
'settings' => $this->company->settings,
'is_system' => $this->is_system,

View File

@ -51,8 +51,35 @@ class TemplateEmail extends Mailable
$this->invitation = $invitation;
}
/**
* Supports inline attachments for large
* attachments in custom designs
*
* @return string
*/
private function buildLinksForCustomDesign(): string
{
$links = $this->build_email->getAttachmentLinks();
if(count($links) == 0)
return '';
$link_string = '<ul>';
foreach($this->build_email->getAttachmentLinks() as $link)
{
$link_string .= "<li>{$link}</li>";
}
$link_string .= '</ul>';
return $link_string;
}
public function build()
{
$template_name = 'email.template.'.$this->build_email->getTemplate();
if ($this->build_email->getTemplate() == 'light' || $this->build_email->getTemplate() == 'dark') {
@ -60,7 +87,7 @@ class TemplateEmail extends Mailable
}
if ($this->build_email->getTemplate() == 'custom') {
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody(), $this->client->getSetting('email_style_custom')));
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody().$this->buildLinksForCustomDesign(), $this->client->getSetting('email_style_custom')));
}
$settings = $this->client->getMergedSettings();

View File

@ -52,6 +52,32 @@ class VendorTemplateEmail extends Mailable
$this->invitation = $invitation;
}
/**
* Supports inline attachments for large
* attachments in custom designs
*
* @return string
*/
private function buildLinksForCustomDesign(): string
{
$links = $this->build_email->getAttachmentLinks();
if(count($links) == 0)
return '';
$link_string = '<ul>';
foreach($this->build_email->getAttachmentLinks() as $link)
{
$link_string .= "<li>{$link}</li>";
}
$link_string .= '</ul>';
return $link_string;
}
public function build()
{
$template_name = 'email.template.'.$this->build_email->getTemplate();
@ -61,7 +87,7 @@ class VendorTemplateEmail extends Mailable
}
if ($this->build_email->getTemplate() == 'custom') {
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody(), $this->company->getSetting('email_style_custom')));
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody().$this->buildLinksForCustomDesign(), $this->company->getSetting('email_style_custom')));
}
$settings = $this->company->settings;

View File

@ -18,7 +18,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
class BankTransactionRule extends BaseModel
{
use SoftDeletes;
use MakesHash;
use Filterable;
protected $fillable = [
@ -66,6 +65,37 @@ class BankTransactionRule extends BaseModel
private array $search_results = [];
public function getEntityType()
{
return self::class;
}
public function company()
{
return $this->belongsTo(Company::class);
}
public function vendor()
{
return $this->belongsTo(Vendor::class);
}
public function client()
{
return $this->belongsTo(Client::class);
}
public function user()
{
return $this->belongsTo(User::class)->withTrashed();
}
public function expense_category()
{
return $this->belongsTo(ExpenseCategory::class, 'category_id')->withTrashed();
}
// rule object looks like this:
//[
// {
@ -138,34 +168,5 @@ class BankTransactionRule extends BaseModel
// }
// }
public function getEntityType()
{
return self::class;
}
public function company()
{
return $this->belongsTo(Company::class);
}
public function vendor()
{
return $this->belongsTo(Vendor::class);
}
public function client()
{
return $this->belongsTo(Client::class);
}
public function user()
{
return $this->belongsTo(User::class)->withTrashed();
}
public function expense_cateogry()
{
return $this->belongsTo(ExpenseCategory::class)->withTrashed();
}
}

View File

@ -12,6 +12,7 @@
namespace App\Models;
use App\DataMapper\ClientSettings;
use App\Jobs\Util\WebhookHandler;
use App\Utils\Traits\MakesHash;
use App\Utils\Traits\UserSessionAttributes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
@ -205,4 +206,24 @@ class BaseModel extends Model
return ctrans('texts.item');
}
/**
* Model helper to send events for webhooks
*
* @param int $event_id
* @param string $additional_data optional includes
*
* @return void
*/
public function sendEvent(int $event_id, string $additional_data = ""): void
{
$subscriptions = Webhook::where('company_id', $this->company_id)
->where('event_id', $event_id)
->exists();
if ($subscriptions) {
WebhookHandler::dispatch($event_id, $this, $this->company, $additional_data);
}
}
}

View File

@ -240,7 +240,6 @@ class ClientContact extends Authenticatable implements HasLocalePreference
{
return $this
->withTrashed()
// ->company()
->where('id', $this->decodePrimaryKey($value))->firstOrFail();
}

View File

@ -39,6 +39,8 @@ class Product extends BaseModel
'in_stock_quantity',
'stock_notification_threshold',
'stock_notification',
'max_quantity',
'product_image',
];
protected $touches = [];

Some files were not shown because too many files have changed in this diff Show More