diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1be041248..cacb0cf11c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,8 @@ jobs: git checkout main npm i npm run build - cp -r dist/react/* ../public/react + cp -r dist/react/* ../public/react + cp -r node_modules/tinymce ../public/ cd .. rm -rf ui php artisan ninja:react diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index 9822ec1347..a793a593bf 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -154,7 +154,7 @@ class CheckData extends Command ->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]"); }); } elseif (! $this->isValid) { - new Exception("Check data failed!!\n".$this->log); + new \Exception("Check data failed!!".$this->log); } } diff --git a/app/Export/CSV/BaseExport.php b/app/Export/CSV/BaseExport.php index 9b606b07c8..9d704574d9 100644 --- a/app/Export/CSV/BaseExport.php +++ b/app/Export/CSV/BaseExport.php @@ -501,6 +501,8 @@ class BaseExport foreach (array_merge($this->input['report_keys'], $this->forced_keys) as $value) { $key = array_search($value, $this->entity_keys); + + $prefix = ''; if(!$key) { $prefix = stripos($value, 'client.') !== false ? ctrans('texts.client') : ctrans('texts.contact'); diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index fc3dbface7..f5d58460bb 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -47,8 +47,11 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio * @method static \Illuminate\Database\Eloquent\Builder|BaseModel count() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel create() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel insert() + * @method static \Illuminate\Database\Eloquent\Builder|BaseModel service() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel whereHas() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed() + * @property-read \Illuminate\Database\Eloquent\Collection $invitations + * @property-read int|null $invitations_count * * @method \App\Models\Company company() * @method int companyId() diff --git a/app/Models/Client.php b/app/Models/Client.php index 6feeb9e26e..acd034b964 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -175,26 +175,7 @@ use Laracasts\Presenter\PresentableTrait; * @method static \Illuminate\Database\Eloquent\Builder|Client whereTaxData($value) * @property int $is_tax_exempt * @method static \Illuminate\Database\Eloquent\Builder|Client whereIsTaxExempt($value) - * @property-read \Illuminate\Database\Eloquent\Collection $activities - * @property-read \Illuminate\Database\Eloquent\Collection $company_ledger - * @property-read \Illuminate\Database\Eloquent\Collection $contacts - * @property-read \Illuminate\Database\Eloquent\Collection $credits - * @property-read \Illuminate\Database\Eloquent\Collection $documents - * @property-read \Illuminate\Database\Eloquent\Collection $expenses - * @property-read \Illuminate\Database\Eloquent\Collection $group_settings - * @property-read \Illuminate\Database\Eloquent\Collection $gateway_tokens - * @property-read \Illuminate\Database\Eloquent\Collection $invoices - * @property-read \Illuminate\Database\Eloquent\Collection $ledger - * @property-read \Illuminate\Database\Eloquent\Collection $payments - * @property-read \Illuminate\Database\Eloquent\Collection $primary_contact - * @property-read \Illuminate\Database\Eloquent\Collection $projects - * @property-read \Illuminate\Database\Eloquent\Collection $quotes - * @property-read \Illuminate\Database\Eloquent\Collection $recurring_expenses - * @property-read \Illuminate\Database\Eloquent\Collection $recurring_invoices - * @property-read \Illuminate\Database\Eloquent\Collection $system_logs - * @property-read \Illuminate\Database\Eloquent\Collection $tasks - * @property-read \Illuminate\Database\Eloquent\Collection $company_ledger - * @property-read \Illuminate\Database\Eloquent\Collection $contacts + * @property int $has_valid_vat_number * @mixin \Eloquent */ diff --git a/app/Models/Company.php b/app/Models/Company.php index 84cf6f47b3..ea94a0a6c1 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -212,29 +212,29 @@ class Company extends BaseModel use AppSetup; use \Awobaz\Compoships\Compoships; - const ENTITY_RECURRING_INVOICE = 'recurring_invoice'; + // const ENTITY_RECURRING_INVOICE = 'recurring_invoice'; - const ENTITY_CREDIT = 'credit'; + // const ENTITY_CREDIT = 'credit'; - const ENTITY_QUOTE = 'quote'; + // const ENTITY_QUOTE = 'quote'; - const ENTITY_TASK = 'task'; + // const ENTITY_TASK = 'task'; - const ENTITY_EXPENSE = 'expense'; + // const ENTITY_EXPENSE = 'expense'; - const ENTITY_PROJECT = 'project'; + // const ENTITY_PROJECT = 'project'; - const ENTITY_VENDOR = 'vendor'; + // const ENTITY_VENDOR = 'vendor'; - const ENTITY_TICKET = 'ticket'; + // const ENTITY_TICKET = 'ticket'; - const ENTITY_PROPOSAL = 'proposal'; + // const ENTITY_PROPOSAL = 'proposal'; - const ENTITY_RECURRING_EXPENSE = 'recurring_expense'; + // const ENTITY_RECURRING_EXPENSE = 'recurring_expense'; - const ENTITY_RECURRING_TASK = 'task'; + // const ENTITY_RECURRING_TASK = 'task'; - const ENTITY_RECURRING_QUOTE = 'recurring_quote'; + // const ENTITY_RECURRING_QUOTE = 'recurring_quote'; protected $presenter = CompanyPresenter::class; @@ -367,31 +367,26 @@ class Company extends BaseModel protected $with = []; - public static $modules = [ - self::ENTITY_RECURRING_INVOICE => 1, - self::ENTITY_CREDIT => 2, - self::ENTITY_QUOTE => 4, - self::ENTITY_TASK => 8, - self::ENTITY_EXPENSE => 16, - self::ENTITY_PROJECT => 32, - self::ENTITY_VENDOR => 64, - self::ENTITY_TICKET => 128, - self::ENTITY_PROPOSAL => 256, - self::ENTITY_RECURRING_EXPENSE => 512, - self::ENTITY_RECURRING_TASK => 1024, - self::ENTITY_RECURRING_QUOTE => 2048, - ]; + // public static $modules = [ + // self::ENTITY_RECURRING_INVOICE => 1, + // self::ENTITY_CREDIT => 2, + // self::ENTITY_QUOTE => 4, + // self::ENTITY_TASK => 8, + // self::ENTITY_EXPENSE => 16, + // self::ENTITY_PROJECT => 32, + // self::ENTITY_VENDOR => 64, + // self::ENTITY_TICKET => 128, + // self::ENTITY_PROPOSAL => 256, + // self::ENTITY_RECURRING_EXPENSE => 512, + // self::ENTITY_RECURRING_TASK => 1024, + // self::ENTITY_RECURRING_QUOTE => 2048, + // ]; public function shouldCalculateTax() { return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries); } - public function refreshTaxData() - { - - } - public function documents() { return $this->morphMany(Document::class, 'documentable'); diff --git a/phpstan.neon b/phpstan.neon index 02983dff19..859693d32c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,9 +2,11 @@ includes: - ./vendor/nunomaduro/larastan/extension.neon parameters: - parallel: - processTimeout: 300.0 treatPhpDocTypesAsCertain: false + parallel: + jobSize: 20 + maximumNumberOfProcesses: 2 + processTimeout: 300.0 ignoreErrors: - '#Call to an undefined method .*badMethod\(\)#' - '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'