2019-04-18 07:01:40 +02:00
|
|
|
<?php
|
2019-05-11 05:32:07 +02:00
|
|
|
/**
|
2020-09-06 11:38:10 +02:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2019-05-11 05:32:07 +02:00
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2023-01-28 23:21:40 +01:00
|
|
|
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
2019-05-11 05:32:07 +02:00
|
|
|
*
|
2021-06-16 08:58:16 +02:00
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
2019-05-11 05:32:07 +02:00
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2022-05-25 08:34:43 +02:00
|
|
|
use App\DataMapper\CompanySettings;
|
2020-10-28 11:10:49 +01:00
|
|
|
use App\Models\Presenters\CompanyPresenter;
|
2020-02-24 11:15:30 +01:00
|
|
|
use App\Services\Notification\NotificationService;
|
2019-11-20 21:55:16 +01:00
|
|
|
use App\Utils\Ninja;
|
2021-07-10 03:40:27 +02:00
|
|
|
use App\Utils\Traits\AppSetup;
|
2019-11-12 22:26:40 +01:00
|
|
|
use App\Utils\Traits\CompanySettingsSaver;
|
2018-11-20 05:36:56 +01:00
|
|
|
use App\Utils\Traits\MakesHash;
|
2019-11-25 10:38:55 +01:00
|
|
|
use App\Utils\Traits\ThrottlesEmail;
|
2020-10-28 11:10:49 +01:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
2020-02-24 11:15:30 +01:00
|
|
|
use Illuminate\Notifications\Notification;
|
2021-03-17 16:12:25 +01:00
|
|
|
use Illuminate\Support\Facades\Cache;
|
2021-05-13 14:41:32 +02:00
|
|
|
use Laracasts\Presenter\PresentableTrait;
|
2018-10-22 14:04:37 +02:00
|
|
|
|
2023-03-08 08:33:42 +01:00
|
|
|
/**
|
|
|
|
* App\Models\Company
|
|
|
|
*
|
|
|
|
* @property int $id
|
|
|
|
* @property int $account_id
|
|
|
|
* @property int|null $industry_id
|
|
|
|
* @property string|null $ip
|
|
|
|
* @property string $company_key
|
|
|
|
* @property int $convert_products
|
|
|
|
* @property int $fill_products
|
|
|
|
* @property int $update_products
|
|
|
|
* @property int $show_product_details
|
|
|
|
* @property int $client_can_register
|
|
|
|
* @property int $custom_surcharge_taxes1
|
|
|
|
* @property int $custom_surcharge_taxes2
|
|
|
|
* @property int $custom_surcharge_taxes3
|
|
|
|
* @property int $custom_surcharge_taxes4
|
|
|
|
* @property int $show_product_cost
|
|
|
|
* @property int $enabled_tax_rates
|
|
|
|
* @property int $enabled_modules
|
|
|
|
* @property int $enable_product_cost
|
|
|
|
* @property int $enable_product_quantity
|
|
|
|
* @property int $default_quantity
|
|
|
|
* @property string|null $subdomain
|
|
|
|
* @property string|null $db
|
|
|
|
* @property int|null $size_id
|
|
|
|
* @property string|null $first_day_of_week
|
|
|
|
* @property string|null $first_month_of_year
|
|
|
|
* @property string $portal_mode
|
|
|
|
* @property string|null $portal_domain
|
|
|
|
* @property int $enable_modules
|
|
|
|
* @property object $custom_fields
|
|
|
|
* @property object $settings
|
|
|
|
* @property string $slack_webhook_url
|
|
|
|
* @property string $google_analytics_key
|
|
|
|
* @property int|null $created_at
|
|
|
|
* @property int|null $updated_at
|
|
|
|
* @property int $enabled_item_tax_rates
|
|
|
|
* @property int $is_large
|
|
|
|
* @property int $enable_shop_api
|
|
|
|
* @property string $default_auto_bill
|
|
|
|
* @property int $mark_expenses_invoiceable
|
|
|
|
* @property int $mark_expenses_paid
|
|
|
|
* @property int $invoice_expense_documents
|
|
|
|
* @property int $auto_start_tasks
|
|
|
|
* @property int $invoice_task_timelog
|
|
|
|
* @property int $invoice_task_documents
|
|
|
|
* @property int $show_tasks_table
|
|
|
|
* @property int $is_disabled
|
|
|
|
* @property int $default_task_is_date_based
|
|
|
|
* @property int $enable_product_discount
|
|
|
|
* @property int $calculate_expense_tax_by_amount
|
|
|
|
* @property int $expense_inclusive_taxes
|
|
|
|
* @property int $session_timeout
|
|
|
|
* @property int $oauth_password_required
|
|
|
|
* @property int $invoice_task_datelog
|
|
|
|
* @property int $default_password_timeout
|
|
|
|
* @property int $show_task_end_date
|
|
|
|
* @property int $markdown_enabled
|
|
|
|
* @property int $use_comma_as_decimal_place
|
|
|
|
* @property int $report_include_drafts
|
|
|
|
* @property array|null $client_registration_fields
|
|
|
|
* @property int $convert_rate_to_client
|
|
|
|
* @property int $markdown_email_enabled
|
|
|
|
* @property int $stop_on_unpaid_recurring
|
|
|
|
* @property int $use_quote_terms_on_conversion
|
|
|
|
* @property int $enable_applying_payments
|
|
|
|
* @property int $track_inventory
|
|
|
|
* @property int $inventory_notification_threshold
|
|
|
|
* @property int $stock_notification
|
|
|
|
* @property string|null $matomo_url
|
|
|
|
* @property int|null $matomo_id
|
2023-04-17 09:24:16 +02:00
|
|
|
* @property bool $enable_e_invoice
|
|
|
|
* @property string $e_invoice_type
|
2023-03-08 08:33:42 +01:00
|
|
|
* @property int $enabled_expense_tax_rates
|
|
|
|
* @property int $invoice_task_project
|
|
|
|
* @property int $report_include_deleted
|
|
|
|
* @property int $invoice_task_lock
|
|
|
|
* @property int $convert_payment_currency
|
|
|
|
* @property int $convert_expense_currency
|
|
|
|
* @property int $notify_vendor_when_paid
|
|
|
|
* @property int $invoice_task_hours
|
|
|
|
* @property-read \App\Models\Account $account
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read int|null $activities_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read int|null $all_activities_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read int|null $all_documents_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read int|null $bank_integrations_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read int|null $bank_transaction_rules_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read int|null $bank_transactions_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read int|null $client_contacts_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read int|null $client_gateway_tokens_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read int|null $clients_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read int|null $company_gateways_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read int|null $company_users_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read int|null $contacts_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read int|null $credits_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read int|null $designs_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read int|null $documents_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read int|null $expense_categories_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read int|null $expenses_count
|
|
|
|
* @property-read mixed $company_id
|
|
|
|
* @property-read mixed $hashed_id
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read int|null $group_settings_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read int|null $groups_count
|
|
|
|
* @property-read \App\Models\Industry|null $industry
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read int|null $invoices_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read int|null $ledger_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read int|null $payment_terms_count
|
|
|
|
* @property-read \App\Models\PaymentType|null $payment_type
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read int|null $payments_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read int|null $products_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read int|null $projects_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read int|null $purchase_orders_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read int|null $quotes_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read int|null $recurring_expenses_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read int|null $recurring_invoices_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read int|null $schedulers_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read int|null $subscriptions_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read int|null $system_log_relation_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read int|null $system_logs_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read int|null $task_schedulers_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read int|null $task_statuses_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read int|null $tasks_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read int|null $tax_rates_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read int|null $tokens_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read int|null $tokens_hashed_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read int|null $user_designs_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read int|null $user_payment_terms_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read int|null $users_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read int|null $vendors_count
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @property-read int|null $webhooks_count
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns)
|
|
|
|
* @method static \Database\Factories\CompanyFactory factory($count = null, $state = [])
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company newModelQuery()
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company newQuery()
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company query()
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereAccountId($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereAutoStartTasks($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCalculateExpenseTaxByAmount($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereClientCanRegister($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereClientRegistrationFields($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCompanyKey($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereConvertExpenseCurrency($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereConvertPaymentCurrency($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereConvertProducts($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereConvertRateToClient($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCreatedAt($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCustomFields($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCustomSurchargeTaxes1($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCustomSurchargeTaxes2($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCustomSurchargeTaxes3($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCustomSurchargeTaxes4($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereDb($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereDefaultAutoBill($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereDefaultPasswordTimeout($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereDefaultQuantity($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereDefaultTaskIsDateBased($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnableApplyingPayments($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnableModules($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnableProductCost($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnableProductDiscount($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnableProductQuantity($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnableShopApi($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnabledExpenseTaxRates($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnabledItemTaxRates($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnabledModules($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEnabledTaxRates($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereExpenseInclusiveTaxes($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereFillProducts($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereFirstDayOfWeek($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereFirstMonthOfYear($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereGoogleAnalyticsKey($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereId($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereIndustryId($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInventoryNotificationThreshold($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInvoiceExpenseDocuments($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInvoiceTaskDatelog($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInvoiceTaskDocuments($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInvoiceTaskHours($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInvoiceTaskLock($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInvoiceTaskProject($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereInvoiceTaskTimelog($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereIp($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereIsDisabled($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereIsLarge($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereMarkExpensesInvoiceable($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereMarkExpensesPaid($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereMarkdownEmailEnabled($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereMarkdownEnabled($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereMatomoId($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereMatomoUrl($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereNotifyVendorWhenPaid($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereOauthPasswordRequired($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company wherePortalDomain($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company wherePortalMode($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereReportIncludeDeleted($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereReportIncludeDrafts($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereSessionTimeout($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereSettings($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereShowProductCost($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereShowProductDetails($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereShowTaskEndDate($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereShowTasksTable($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereSizeId($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereSlackWebhookUrl($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereStockNotification($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereStopOnUnpaidRecurring($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereSubdomain($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereTrackInventory($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereUpdateProducts($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereUpdatedAt($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereUseCommaAsDecimalPlace($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereUseQuoteTermsOnConversion($value)
|
2023-03-16 05:20:38 +01:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
2023-03-21 12:37:06 +01:00
|
|
|
* @property int $calculate_taxes
|
|
|
|
* @property mixed $tax_data
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCalculateTaxes($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereTaxAllProducts($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereTaxData($value)
|
2023-03-24 02:12:12 +01:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
2023-03-27 22:47:07 +02:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
2023-03-29 04:13:50 +02:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
2023-03-29 05:23:06 +02:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
2023-03-29 04:13:50 +02:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
2023-03-27 22:47:07 +02:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
2023-03-24 02:12:12 +01:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
2023-03-24 08:02:34 +01:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
2023-03-27 05:47:01 +02:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
2023-03-24 08:02:34 +01:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
2023-03-24 02:12:12 +01:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
2023-04-10 09:37:40 +02:00
|
|
|
* @property int $tax_all_products
|
|
|
|
* @property int $use_xinvoice
|
|
|
|
* @property string $xinvoice_type
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereUseXinvoice($value)
|
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Company whereXinvoiceType($value)
|
2023-04-13 07:39:12 +02:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $all_activities
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $all_documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransactionRule> $bank_transaction_rules
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $bank_transactions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $client_contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyGateway> $company_gateways
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ExpenseCategory> $expense_categories
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $groups
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrder> $purchase_orders
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Subscription> $subscriptions
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_log_relation
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Scheduler> $task_schedulers
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaskStatus> $task_statuses
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TaxRate> $tax_rates
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens_hashed
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Design> $user_designs
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentTerm> $user_payment_terms
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Vendor> $vendors
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
2023-03-08 08:33:42 +01:00
|
|
|
* @mixin \Eloquent
|
|
|
|
*/
|
2018-11-02 11:54:46 +01:00
|
|
|
class Company extends BaseModel
|
2018-10-22 14:04:37 +02:00
|
|
|
{
|
2018-11-02 11:54:46 +01:00
|
|
|
use PresentableTrait;
|
2018-11-20 05:36:56 +01:00
|
|
|
use MakesHash;
|
2019-11-12 22:26:40 +01:00
|
|
|
use CompanySettingsSaver;
|
2019-11-25 10:38:55 +01:00
|
|
|
use ThrottlesEmail;
|
2021-07-10 03:40:27 +02:00
|
|
|
use AppSetup;
|
2022-03-15 13:28:16 +01:00
|
|
|
use \Awobaz\Compoships\Compoships;
|
2020-02-15 10:06:30 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_RECURRING_INVOICE = 'recurring_invoice';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_CREDIT = 'credit';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_QUOTE = 'quote';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_TASK = 'task';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_EXPENSE = 'expense';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_PROJECT = 'project';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_VENDOR = 'vendor';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_TICKET = 'ticket';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_PROPOSAL = 'proposal';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_RECURRING_EXPENSE = 'recurring_expense';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_RECURRING_TASK = 'task';
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
const ENTITY_RECURRING_QUOTE = 'recurring_quote';
|
2020-03-03 10:44:26 +01:00
|
|
|
|
2020-10-28 11:10:49 +01:00
|
|
|
protected $presenter = CompanyPresenter::class;
|
2018-11-02 11:54:46 +01:00
|
|
|
|
2023-03-21 12:37:06 +01:00
|
|
|
protected array $tax_coverage_countries = [
|
|
|
|
'US',
|
|
|
|
// //EU countries
|
|
|
|
// 'AT', // Austria
|
|
|
|
// 'BE', // Belgium
|
|
|
|
// 'BG', // Bulgaria
|
|
|
|
// 'CY', // Cyprus
|
|
|
|
// 'CZ', // Czech Republic
|
|
|
|
// 'DE', // Germany
|
|
|
|
// 'DK', // Denmark
|
|
|
|
// 'EE', // Estonia
|
|
|
|
// 'ES', // Spain
|
|
|
|
// 'FI', // Finland
|
|
|
|
// 'FR', // France
|
|
|
|
// 'GR', // Greece
|
|
|
|
// 'HR', // Croatia
|
|
|
|
// 'HU', // Hungary
|
|
|
|
// 'IE', // Ireland
|
|
|
|
// 'IT', // Italy
|
|
|
|
// 'LT', // Lithuania
|
|
|
|
// 'LU', // Luxembourg
|
|
|
|
// 'LV', // Latvia
|
|
|
|
// 'MT', // Malta
|
|
|
|
// 'NL', // Netherlands
|
|
|
|
// 'PL', // Poland
|
|
|
|
// 'PT', // Portugal
|
|
|
|
// 'RO', // Romania
|
|
|
|
// 'SE', // Sweden
|
|
|
|
// 'SI', // Slovenia
|
|
|
|
// 'SK', // Slovakia
|
|
|
|
// //EU Countries
|
|
|
|
];
|
|
|
|
|
2019-06-17 02:15:42 +02:00
|
|
|
protected $fillable = [
|
2023-01-12 14:32:54 +01:00
|
|
|
'invoice_task_hours',
|
2021-08-08 00:27:53 +02:00
|
|
|
'markdown_enabled',
|
2021-01-05 03:24:32 +01:00
|
|
|
'calculate_expense_tax_by_amount',
|
2020-10-29 00:11:52 +01:00
|
|
|
'invoice_expense_documents',
|
|
|
|
'invoice_task_documents',
|
2020-10-28 06:50:06 +01:00
|
|
|
'show_tasks_table',
|
2020-10-14 23:25:40 +02:00
|
|
|
'mark_expenses_invoiceable',
|
|
|
|
'mark_expenses_paid',
|
2020-06-24 01:18:38 +02:00
|
|
|
'enabled_item_tax_rates',
|
2019-11-22 22:10:53 +01:00
|
|
|
'fill_products',
|
2019-06-26 06:04:10 +02:00
|
|
|
'industry_id',
|
2019-12-10 21:53:41 +01:00
|
|
|
'subdomain',
|
2019-06-26 06:04:10 +02:00
|
|
|
'size_id',
|
2019-10-10 04:52:57 +02:00
|
|
|
'custom_fields',
|
2019-11-12 12:36:24 +01:00
|
|
|
'enable_product_cost',
|
|
|
|
'enable_product_quantity',
|
2020-02-26 04:26:07 +01:00
|
|
|
'enabled_modules',
|
2019-11-12 12:36:24 +01:00
|
|
|
'default_quantity',
|
2019-11-21 09:38:57 +01:00
|
|
|
'enabled_tax_rates',
|
|
|
|
'portal_mode',
|
|
|
|
'portal_domain',
|
|
|
|
'convert_products',
|
|
|
|
'update_products',
|
|
|
|
'custom_surcharge_taxes1',
|
|
|
|
'custom_surcharge_taxes2',
|
|
|
|
'custom_surcharge_taxes3',
|
|
|
|
'custom_surcharge_taxes4',
|
2019-12-26 23:33:07 +01:00
|
|
|
'show_product_details',
|
2020-02-25 09:33:53 +01:00
|
|
|
'first_day_of_week',
|
|
|
|
'first_month_of_year',
|
2020-02-28 22:57:47 +01:00
|
|
|
'slack_webhook_url',
|
2020-04-09 14:04:26 +02:00
|
|
|
'google_analytics_key',
|
2022-12-07 08:39:05 +01:00
|
|
|
'matomo_url',
|
|
|
|
'matomo_id',
|
2023-04-17 09:24:16 +02:00
|
|
|
'enable_e_invoice',
|
|
|
|
'e_invoice_type',
|
2020-06-28 12:38:41 +02:00
|
|
|
'client_can_register',
|
2020-07-29 11:25:59 +02:00
|
|
|
'enable_shop_api',
|
2020-10-26 21:46:06 +01:00
|
|
|
'invoice_task_timelog',
|
|
|
|
'auto_start_tasks',
|
2020-11-01 06:18:40 +01:00
|
|
|
'is_disabled',
|
2020-12-14 22:52:14 +01:00
|
|
|
'default_task_is_date_based',
|
2020-12-17 11:53:20 +01:00
|
|
|
'enable_product_discount',
|
2021-01-08 11:27:49 +01:00
|
|
|
'expense_inclusive_taxes',
|
2021-02-15 22:52:38 +01:00
|
|
|
'session_timeout',
|
|
|
|
'oauth_password_required',
|
2021-02-27 11:08:39 +01:00
|
|
|
'invoice_task_datelog',
|
2021-03-09 11:34:39 +01:00
|
|
|
'default_password_timeout',
|
2021-05-06 23:12:07 +02:00
|
|
|
'show_task_end_date',
|
2021-08-19 00:12:39 +02:00
|
|
|
'use_comma_as_decimal_place',
|
2021-08-25 11:41:03 +02:00
|
|
|
'report_include_drafts',
|
2021-09-30 00:14:48 +02:00
|
|
|
'client_registration_fields',
|
2022-02-07 09:01:05 +01:00
|
|
|
'convert_rate_to_client',
|
2022-03-29 10:07:48 +02:00
|
|
|
'markdown_email_enabled',
|
2022-05-17 09:36:28 +02:00
|
|
|
'stop_on_unpaid_recurring',
|
|
|
|
'use_quote_terms_on_conversion',
|
2022-05-31 13:17:18 +02:00
|
|
|
'enable_applying_payments',
|
|
|
|
'track_inventory',
|
|
|
|
'inventory_notification_threshold',
|
2022-06-21 11:57:17 +02:00
|
|
|
'stock_notification',
|
2022-07-29 01:26:31 +02:00
|
|
|
'enabled_expense_tax_rates',
|
2022-08-25 00:00:52 +02:00
|
|
|
'invoice_task_project',
|
2022-09-07 12:23:05 +02:00
|
|
|
'report_include_deleted',
|
2022-11-23 00:01:37 +01:00
|
|
|
'invoice_task_lock',
|
2022-12-07 03:48:38 +01:00
|
|
|
'convert_payment_currency',
|
|
|
|
'convert_expense_currency',
|
2022-12-20 11:46:20 +01:00
|
|
|
'notify_vendor_when_paid',
|
2023-03-21 08:14:25 +01:00
|
|
|
'calculate_taxes',
|
2018-10-22 14:04:37 +02:00
|
|
|
];
|
|
|
|
|
2019-07-30 00:28:38 +02:00
|
|
|
protected $hidden = [
|
|
|
|
'id',
|
|
|
|
'db',
|
|
|
|
'ip',
|
2019-03-02 22:44:08 +01:00
|
|
|
];
|
2019-02-17 11:34:46 +01:00
|
|
|
|
|
|
|
protected $casts = [
|
2022-12-20 11:46:20 +01:00
|
|
|
'is_proforma' => 'bool',
|
2019-11-10 13:06:30 +01:00
|
|
|
'country_id' => 'string',
|
|
|
|
'custom_fields' => 'object',
|
2019-09-26 00:27:26 +02:00
|
|
|
'settings' => 'object',
|
|
|
|
'updated_at' => 'timestamp',
|
|
|
|
'created_at' => 'timestamp',
|
|
|
|
'deleted_at' => 'timestamp',
|
2021-09-30 00:14:48 +02:00
|
|
|
'client_registration_fields' => 'array',
|
2023-03-21 12:37:06 +01:00
|
|
|
'tax_data' => 'object',
|
2019-02-17 11:34:46 +01:00
|
|
|
];
|
|
|
|
|
2022-05-12 05:57:41 +02:00
|
|
|
protected $with = [];
|
2019-04-25 09:16:41 +02:00
|
|
|
|
2020-03-03 10:44:26 +01:00
|
|
|
public static $modules = [
|
|
|
|
self::ENTITY_RECURRING_INVOICE => 1,
|
|
|
|
self::ENTITY_CREDIT => 2,
|
|
|
|
self::ENTITY_QUOTE => 4,
|
2023-03-08 10:30:45 +01:00
|
|
|
// @phpstan-ignore-next-line
|
2020-03-03 10:44:26 +01:00
|
|
|
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,
|
2020-03-08 10:06:21 +01:00
|
|
|
self::ENTITY_RECURRING_QUOTE => 2048,
|
2020-03-03 10:44:26 +01:00
|
|
|
];
|
|
|
|
|
2023-03-21 12:37:06 +01:00
|
|
|
public function shouldCalculateTax()
|
|
|
|
{
|
|
|
|
return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries);
|
|
|
|
}
|
|
|
|
|
2023-03-21 21:30:37 +01:00
|
|
|
public function refreshTaxData()
|
|
|
|
{
|
2023-04-17 09:24:16 +02:00
|
|
|
|
2023-03-21 21:30:37 +01:00
|
|
|
}
|
|
|
|
|
2020-06-24 10:59:56 +02:00
|
|
|
public function documents()
|
|
|
|
{
|
|
|
|
return $this->morphMany(Document::class, 'documentable');
|
|
|
|
}
|
2020-09-06 11:38:10 +02:00
|
|
|
|
2023-01-16 22:31:07 +01:00
|
|
|
public function schedulers()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Scheduler::class);
|
|
|
|
}
|
|
|
|
|
2023-01-16 22:37:15 +01:00
|
|
|
public function task_schedulers() //alias for schedulers
|
|
|
|
{
|
|
|
|
return $this->hasMany(Scheduler::class);
|
|
|
|
}
|
|
|
|
|
2021-05-30 13:26:43 +02:00
|
|
|
public function all_documents()
|
|
|
|
{
|
2021-06-03 23:30:11 +02:00
|
|
|
return $this->hasMany(Document::class);
|
2021-05-30 13:26:43 +02:00
|
|
|
}
|
|
|
|
|
2020-05-06 13:49:42 +02:00
|
|
|
public function getEntityType()
|
|
|
|
{
|
2020-09-06 11:38:10 +02:00
|
|
|
return self::class;
|
2020-05-06 13:49:42 +02:00
|
|
|
}
|
|
|
|
|
2020-04-11 13:19:05 +02:00
|
|
|
public function ledger()
|
|
|
|
{
|
|
|
|
return $this->hasMany(CompanyLedger::class);
|
|
|
|
}
|
|
|
|
|
2022-09-07 07:09:53 +02:00
|
|
|
public function bank_integrations()
|
|
|
|
{
|
|
|
|
return $this->hasMany(BankIntegration::class);
|
|
|
|
}
|
|
|
|
|
2022-09-14 06:33:05 +02:00
|
|
|
public function bank_transactions()
|
|
|
|
{
|
|
|
|
return $this->hasMany(BankTransaction::class);
|
|
|
|
}
|
|
|
|
|
2022-11-21 11:49:33 +01:00
|
|
|
public function bank_transaction_rules()
|
|
|
|
{
|
|
|
|
return $this->hasMany(BankTransactionRule::class);
|
|
|
|
}
|
|
|
|
|
2018-11-20 05:36:56 +01:00
|
|
|
public function getCompanyIdAttribute()
|
|
|
|
{
|
|
|
|
return $this->encodePrimaryKey($this->id);
|
|
|
|
}
|
2018-10-22 14:04:37 +02:00
|
|
|
|
|
|
|
public function account()
|
|
|
|
{
|
2018-11-02 11:54:46 +01:00
|
|
|
return $this->belongsTo(Account::class);
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2021-05-13 05:32:36 +02:00
|
|
|
public function client_contacts()
|
|
|
|
{
|
|
|
|
return $this->hasMany(ClientContact::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
public function users()
|
|
|
|
{
|
2022-01-11 09:08:08 +01:00
|
|
|
return $this->hasManyThrough(User::class, CompanyUser::class, 'company_id', 'id', 'id', 'user_id')->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2020-10-25 21:56:02 +01:00
|
|
|
public function expense_categories()
|
|
|
|
{
|
|
|
|
return $this->hasMany(ExpenseCategory::class)->withTrashed();
|
|
|
|
}
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2021-03-25 11:55:59 +01:00
|
|
|
public function subscriptions()
|
2021-03-10 01:08:58 +01:00
|
|
|
{
|
2021-03-25 11:55:59 +01:00
|
|
|
return $this->hasMany(Subscription::class)->withTrashed();
|
2021-03-10 01:08:58 +01:00
|
|
|
}
|
|
|
|
|
2022-06-14 14:18:20 +02:00
|
|
|
public function purchase_orders()
|
|
|
|
{
|
|
|
|
return $this->hasMany(PurchaseOrder::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2020-10-25 21:56:02 +01:00
|
|
|
public function task_statuses()
|
|
|
|
{
|
|
|
|
return $this->hasMany(TaskStatus::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
public function clients()
|
|
|
|
{
|
2019-11-25 10:38:55 +01:00
|
|
|
return $this->hasMany(Client::class)->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2020-01-21 01:32:34 +01:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2020-01-21 01:32:34 +01:00
|
|
|
*/
|
|
|
|
public function tasks()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Task::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2020-07-07 00:35:28 +02:00
|
|
|
public function webhooks()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Webhook::class);
|
|
|
|
}
|
|
|
|
|
2020-01-21 01:32:34 +01:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2020-01-21 01:32:34 +01:00
|
|
|
*/
|
|
|
|
public function projects()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Project::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2020-01-20 02:31:58 +01:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2020-01-20 02:31:58 +01:00
|
|
|
*/
|
|
|
|
public function vendors()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Vendor::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2021-05-13 05:32:36 +02:00
|
|
|
public function all_activities()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Activity::class);
|
|
|
|
}
|
|
|
|
|
2019-11-27 10:47:59 +01:00
|
|
|
public function activities()
|
|
|
|
{
|
2021-08-18 00:04:31 +02:00
|
|
|
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(50);
|
2019-11-27 10:47:59 +01:00
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2018-10-22 14:04:37 +02:00
|
|
|
*/
|
|
|
|
public function contacts()
|
|
|
|
{
|
2019-07-08 02:08:57 +02:00
|
|
|
return $this->hasMany(ClientContact::class);
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2019-09-22 12:41:43 +02:00
|
|
|
public function groups()
|
|
|
|
{
|
|
|
|
return $this->hasMany(GroupSetting::class);
|
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2018-10-22 14:04:37 +02:00
|
|
|
*/
|
|
|
|
public function invoices()
|
|
|
|
{
|
2019-11-25 10:38:55 +01:00
|
|
|
return $this->hasMany(Invoice::class)->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2020-09-10 03:05:42 +02:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2020-09-10 03:05:42 +02:00
|
|
|
*/
|
|
|
|
public function recurring_invoices()
|
|
|
|
{
|
|
|
|
return $this->hasMany(RecurringInvoice::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2021-08-29 12:34:53 +02:00
|
|
|
/**
|
|
|
|
* @return HasMany
|
|
|
|
*/
|
|
|
|
public function recurring_expenses()
|
|
|
|
{
|
|
|
|
return $this->hasMany(RecurringExpense::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2019-12-25 13:22:10 +01:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2019-12-25 13:22:10 +01:00
|
|
|
*/
|
|
|
|
public function quotes()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Quote::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2019-12-25 13:22:10 +01:00
|
|
|
*/
|
|
|
|
public function credits()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Credit::class)->withTrashed();
|
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2018-10-22 14:04:37 +02:00
|
|
|
*/
|
2019-08-22 03:58:42 +02:00
|
|
|
public function company_gateways()
|
2018-10-22 14:04:37 +02:00
|
|
|
{
|
2021-09-10 13:40:49 +02:00
|
|
|
return $this->hasMany(CompanyGateway::class)->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2018-10-22 14:04:37 +02:00
|
|
|
*/
|
|
|
|
public function tax_rates()
|
|
|
|
{
|
2021-09-10 13:40:49 +02:00
|
|
|
return $this->hasMany(TaxRate::class)->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return HasMany
|
2018-10-22 14:04:37 +02:00
|
|
|
*/
|
|
|
|
public function products()
|
|
|
|
{
|
2021-09-10 13:40:49 +02:00
|
|
|
return $this->hasMany(Product::class)->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function country()
|
|
|
|
{
|
2022-07-28 02:58:13 +02:00
|
|
|
$companies = Cache::get('countries');
|
|
|
|
|
|
|
|
if (! $companies) {
|
|
|
|
$this->buildCache(true);
|
|
|
|
|
|
|
|
$companies = Cache::get('countries');
|
|
|
|
}
|
|
|
|
|
|
|
|
return $companies->filter(function ($item) {
|
|
|
|
return $item->id == $this->getSetting('country_id');
|
|
|
|
})->first();
|
|
|
|
|
2021-03-17 16:12:25 +01:00
|
|
|
// return $this->belongsTo(Country::class);
|
2022-07-28 02:58:13 +02:00
|
|
|
// return Country::find($this->settings->country_id);
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2019-09-10 04:30:43 +02:00
|
|
|
public function group_settings()
|
|
|
|
{
|
2021-09-10 13:40:49 +02:00
|
|
|
return $this->hasMany(GroupSetting::class)->withTrashed();
|
2019-09-10 04:30:43 +02:00
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
public function timezone()
|
|
|
|
{
|
2021-07-10 03:40:27 +02:00
|
|
|
$timezones = Cache::get('timezones');
|
|
|
|
|
2022-06-21 11:57:17 +02:00
|
|
|
if (! $timezones) {
|
2021-07-10 03:40:27 +02:00
|
|
|
$this->buildCache(true);
|
2022-06-21 11:57:17 +02:00
|
|
|
}
|
2021-07-10 03:40:27 +02:00
|
|
|
|
|
|
|
return $timezones->filter(function ($item) {
|
|
|
|
return $item->id == $this->settings->timezone_id;
|
|
|
|
})->first();
|
|
|
|
|
|
|
|
// return Timezone::find($this->settings->timezone_id);
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2020-02-15 10:06:30 +01:00
|
|
|
public function designs()
|
|
|
|
{
|
2020-03-21 06:37:30 +01:00
|
|
|
return $this->hasMany(Design::class)->whereCompanyId($this->id)->orWhere('company_id', null);
|
2020-02-15 10:06:30 +01:00
|
|
|
}
|
|
|
|
|
2021-05-13 03:25:26 +02:00
|
|
|
public function user_designs()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Design::class);
|
|
|
|
}
|
|
|
|
|
2020-05-23 05:33:44 +02:00
|
|
|
public function payment_terms()
|
|
|
|
{
|
|
|
|
return $this->hasMany(PaymentTerm::class)->whereCompanyId($this->id)->orWhere('company_id', null);
|
|
|
|
}
|
|
|
|
|
2021-05-13 03:25:26 +02:00
|
|
|
public function user_payment_terms()
|
|
|
|
{
|
|
|
|
return $this->hasMany(PaymentTerm::class);
|
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
public function language()
|
|
|
|
{
|
2021-07-10 03:40:27 +02:00
|
|
|
$languages = Cache::get('languages');
|
|
|
|
|
2022-08-11 01:34:13 +02:00
|
|
|
//build cache and reinit
|
2022-06-21 11:57:17 +02:00
|
|
|
if (! $languages) {
|
2021-07-10 03:40:27 +02:00
|
|
|
$this->buildCache(true);
|
2022-08-11 01:34:13 +02:00
|
|
|
$languages = Cache::get('languages');
|
2022-06-21 11:57:17 +02:00
|
|
|
}
|
2021-07-10 03:40:27 +02:00
|
|
|
|
2022-08-11 01:34:13 +02:00
|
|
|
//if the cache is still dead, get from DB
|
2023-02-16 02:36:09 +01:00
|
|
|
if (!$languages && property_exists($this->settings, 'language_id')) {
|
2022-08-11 01:34:13 +02:00
|
|
|
return Language::find($this->settings->language_id);
|
2023-02-16 02:36:09 +01:00
|
|
|
}
|
2022-08-11 01:34:13 +02:00
|
|
|
|
2021-07-10 03:40:27 +02:00
|
|
|
return $languages->filter(function ($item) {
|
|
|
|
return $item->id == $this->settings->language_id;
|
|
|
|
})->first();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2019-09-11 01:31:55 +02:00
|
|
|
public function getLocale()
|
|
|
|
{
|
|
|
|
return isset($this->settings->language_id) && $this->language() ? $this->language()->locale : config('ninja.i18n.locale');
|
|
|
|
}
|
|
|
|
|
2020-10-15 11:41:59 +02:00
|
|
|
public function getLogo() :?string
|
2019-10-03 07:17:57 +02:00
|
|
|
{
|
2019-10-11 06:30:26 +02:00
|
|
|
return $this->settings->company_logo ?: null;
|
2019-10-03 07:17:57 +02:00
|
|
|
}
|
|
|
|
|
2020-03-25 03:50:08 +01:00
|
|
|
public function locale()
|
|
|
|
{
|
|
|
|
return $this->getLocale();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSetting($setting)
|
|
|
|
{
|
|
|
|
if (property_exists($this->settings, $setting) != false) {
|
|
|
|
return $this->settings->{$setting};
|
|
|
|
}
|
|
|
|
|
2022-05-25 08:34:43 +02:00
|
|
|
$cs = CompanySettings::defaults();
|
|
|
|
|
|
|
|
if (property_exists($cs, $setting) != false) {
|
|
|
|
return $cs->{$setting};
|
|
|
|
}
|
|
|
|
|
2020-03-25 03:50:08 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2018-10-22 14:04:37 +02:00
|
|
|
public function currency()
|
|
|
|
{
|
2021-03-17 16:12:25 +01:00
|
|
|
$currencies = Cache::get('currencies');
|
|
|
|
|
|
|
|
return $currencies->filter(function ($item) {
|
|
|
|
return $item->id == $this->settings->currency_id;
|
|
|
|
})->first();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return BelongsTo
|
2018-10-22 14:04:37 +02:00
|
|
|
*/
|
|
|
|
public function industry()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Industry::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return BelongsTo
|
2018-10-22 14:04:37 +02:00
|
|
|
*/
|
|
|
|
public function payment_type()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(PaymentType::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function expenses()
|
|
|
|
{
|
2019-12-25 13:22:10 +01:00
|
|
|
return $this->hasMany(Expense::class)->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function payments()
|
|
|
|
{
|
2019-12-25 13:22:10 +01:00
|
|
|
return $this->hasMany(Payment::class)->withTrashed();
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|
|
|
|
|
2019-03-26 05:46:08 +01:00
|
|
|
public function tokens()
|
|
|
|
{
|
|
|
|
return $this->hasMany(CompanyToken::class);
|
|
|
|
}
|
|
|
|
|
2021-01-31 06:07:45 +01:00
|
|
|
public function client_gateway_tokens()
|
|
|
|
{
|
|
|
|
return $this->hasMany(ClientGatewayToken::class);
|
|
|
|
}
|
|
|
|
|
2020-08-24 04:45:53 +02:00
|
|
|
public function system_logs()
|
|
|
|
{
|
2021-03-30 00:32:33 +02:00
|
|
|
return $this->hasMany(SystemLog::class)->orderBy('id', 'DESC')->take(100);
|
2020-08-24 04:45:53 +02:00
|
|
|
}
|
|
|
|
|
2021-01-06 22:27:59 +01:00
|
|
|
public function system_log_relation()
|
|
|
|
{
|
|
|
|
return $this->hasMany(SystemLog::class)->orderBy('id', 'DESC');
|
|
|
|
}
|
|
|
|
|
2020-07-13 04:54:56 +02:00
|
|
|
public function tokens_hashed()
|
|
|
|
{
|
|
|
|
return $this->hasMany(CompanyToken::class);
|
|
|
|
}
|
|
|
|
|
2019-03-27 07:22:27 +01:00
|
|
|
public function company_users()
|
|
|
|
{
|
2022-03-15 13:28:16 +01:00
|
|
|
return $this->hasMany(CompanyUser::class)->withTrashed();
|
2019-03-27 07:22:27 +01:00
|
|
|
}
|
|
|
|
|
2019-04-18 13:57:22 +02:00
|
|
|
public function owner()
|
2021-05-13 15:37:25 +02:00
|
|
|
{
|
2022-07-29 04:12:24 +02:00
|
|
|
return $this->company_users()->withTrashed()->where('is_owner', true)->first()?->user;
|
2019-04-18 13:57:22 +02:00
|
|
|
}
|
|
|
|
|
2022-11-20 03:12:33 +01:00
|
|
|
public function credit_rules()
|
|
|
|
{
|
|
|
|
return BankTransactionRule::query()
|
|
|
|
->where('company_id', $this->id)
|
|
|
|
->where('applies_to', 'CREDIT')
|
|
|
|
->get();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function debit_rules()
|
|
|
|
{
|
|
|
|
return BankTransactionRule::query()
|
|
|
|
->where('company_id', $this->id)
|
|
|
|
->where('applies_to', 'DEBIT')
|
|
|
|
->get();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-25 15:19:52 +01:00
|
|
|
public function resolveRouteBinding($value, $field = null)
|
2019-11-12 05:41:02 +01:00
|
|
|
{
|
2023-01-22 06:34:47 +01:00
|
|
|
return $this->where('id', $this->decodePrimaryKey($value))
|
|
|
|
->where('account_id', auth()->user()->account_id)
|
|
|
|
->firstOrFail();
|
2019-11-12 05:41:02 +01:00
|
|
|
}
|
2019-11-20 21:55:16 +01:00
|
|
|
|
2019-12-10 21:53:41 +01:00
|
|
|
public function domain()
|
|
|
|
{
|
2021-05-15 06:29:19 +02:00
|
|
|
if (Ninja::isHosted()) {
|
2022-06-21 11:57:17 +02:00
|
|
|
if ($this->portal_mode == 'domain' && strlen($this->portal_domain) > 3) {
|
2021-04-28 05:40:11 +02:00
|
|
|
return $this->portal_domain;
|
2022-06-21 11:57:17 +02:00
|
|
|
}
|
2021-04-28 05:40:11 +02:00
|
|
|
|
2022-06-21 11:57:17 +02:00
|
|
|
return "https://{$this->subdomain}.".config('ninja.app_domain');
|
2020-03-21 06:37:30 +01:00
|
|
|
}
|
2020-03-18 10:40:15 +01:00
|
|
|
|
|
|
|
return config('ninja.app_url');
|
2019-12-10 21:53:41 +01:00
|
|
|
}
|
2020-02-24 11:15:30 +01:00
|
|
|
|
|
|
|
public function notification(Notification $notification)
|
|
|
|
{
|
|
|
|
return new NotificationService($this, $notification);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function routeNotificationForSlack($notification)
|
|
|
|
{
|
2020-03-03 10:44:26 +01:00
|
|
|
return $this->slack_webhook_url;
|
2020-02-24 11:15:30 +01:00
|
|
|
}
|
2021-05-06 06:39:18 +02:00
|
|
|
|
2022-03-14 23:30:19 +01:00
|
|
|
public function file_path()
|
|
|
|
{
|
|
|
|
return $this->company_key.'/';
|
|
|
|
}
|
|
|
|
|
2021-05-06 06:39:18 +02:00
|
|
|
public function rBits()
|
|
|
|
{
|
|
|
|
$user = $this->owner();
|
|
|
|
$data = [];
|
|
|
|
|
|
|
|
$data[] = $this->createRBit('business_name', 'user', ['business_name' => $this->present()->name()]);
|
2021-05-07 09:07:49 +02:00
|
|
|
$data[] = $this->createRBit('industry_code', 'user', ['industry_detail' => $this->industry ? $this->industry->name : '']);
|
2021-05-06 06:39:18 +02:00
|
|
|
$data[] = $this->createRBit('comment', 'partner_database', ['comment_text' => 'Logo image not present']);
|
2021-05-07 09:07:49 +02:00
|
|
|
$data[] = $this->createRBit('business_description', 'user', ['business_description' => $this->present()->size()]);
|
2021-05-06 06:39:18 +02:00
|
|
|
|
|
|
|
$data[] = $this->createRBit('person', 'user', ['name' => $user->present()->getFullName()]);
|
|
|
|
$data[] = $this->createRBit('email', 'user', ['email' => $user->email]);
|
|
|
|
$data[] = $this->createRBit('phone', 'user', ['phone' => $user->phone]);
|
2021-05-07 09:07:49 +02:00
|
|
|
$data[] = $this->createRBit('website_uri', 'user', ['uri' => $this->settings->website]);
|
2021-05-06 06:39:18 +02:00
|
|
|
$data[] = $this->createRBit('external_account', 'partner_database', ['is_partner_account' => 'yes', 'account_type' => 'Invoice Ninja', 'create_time' => time()]);
|
|
|
|
|
|
|
|
return $data;
|
|
|
|
}
|
2021-05-07 09:07:49 +02:00
|
|
|
|
|
|
|
private function createRBit($type, $source, $properties)
|
|
|
|
{
|
|
|
|
$data = new \stdClass;
|
|
|
|
$data->receive_time = time();
|
|
|
|
$data->type = $type;
|
|
|
|
$data->source = $source;
|
|
|
|
$data->properties = new \stdClass;
|
|
|
|
|
|
|
|
foreach ($properties as $key => $val) {
|
|
|
|
$data->properties->$key = $val;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $data;
|
|
|
|
}
|
2022-04-06 02:38:01 +02:00
|
|
|
|
2023-01-17 09:42:34 +01:00
|
|
|
public function timezone_offset()
|
|
|
|
{
|
|
|
|
$offset = 0;
|
|
|
|
|
|
|
|
$entity_send_time = $this->getSetting('entity_send_time');
|
|
|
|
|
|
|
|
if ($entity_send_time == 0) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$timezone = $this->timezone();
|
|
|
|
|
|
|
|
$offset -= $timezone->utc_offset;
|
|
|
|
$offset += ($entity_send_time * 3600);
|
|
|
|
|
|
|
|
return $offset;
|
|
|
|
}
|
|
|
|
|
2023-01-17 12:40:40 +01:00
|
|
|
public function translate_entity()
|
|
|
|
{
|
|
|
|
return ctrans('texts.company');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function date_format()
|
|
|
|
{
|
|
|
|
$date_formats = Cache::get('date_formats');
|
|
|
|
|
|
|
|
if (! $date_formats) {
|
|
|
|
$this->buildCache(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $date_formats->filter(function ($item) {
|
|
|
|
return $item->id == $this->getSetting('date_format_id');
|
|
|
|
})->first()->format;
|
|
|
|
}
|
2018-10-22 14:04:37 +02:00
|
|
|
}
|