mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-08 22:44:36 -04:00
commit
d451bfcb0a
@ -1 +1 @@
|
|||||||
5.5.96
|
5.5.97
|
@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
namespace App\DataMapper\Schedule;
|
namespace App\DataMapper\Schedule;
|
||||||
|
|
||||||
class ScheduleEntity
|
class EmailRecord
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Defines the template name
|
* Defines the template name
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public string $template = 'schedule_entity';
|
public string $template = 'email_record';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the template name
|
* Defines the template name
|
@ -13,8 +13,15 @@ namespace App\DataMapper\Tax;
|
|||||||
|
|
||||||
use App\DataMapper\Tax\ZipTax\Response;
|
use App\DataMapper\Tax\ZipTax\Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClientTaxData
|
||||||
|
*
|
||||||
|
* Definition for the client tax data
|
||||||
|
*/
|
||||||
class ClientTaxData
|
class ClientTaxData
|
||||||
{
|
{
|
||||||
|
public int $updated_at;
|
||||||
|
|
||||||
public function __construct(public Response $origin, public Response $destination)
|
public function __construct(public Response $origin, public Response $destination)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,15 @@ namespace App\DataMapper\Tax;
|
|||||||
|
|
||||||
use App\DataMapper\Tax\ZipTax\Response;
|
use App\DataMapper\Tax\ZipTax\Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CompanyTaxData
|
||||||
|
*
|
||||||
|
* Definition for the company tax data structure
|
||||||
|
*/
|
||||||
class CompanyTaxData
|
class CompanyTaxData
|
||||||
{
|
{
|
||||||
|
public int $updated_at;
|
||||||
|
|
||||||
public function __construct(public Response $origin)
|
public function __construct(public Response $origin)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,15 @@ namespace App\DataMapper\Tax;
|
|||||||
|
|
||||||
use App\DataMapper\Tax\ZipTax\Response;
|
use App\DataMapper\Tax\ZipTax\Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* InvoiceTaxData
|
||||||
|
*
|
||||||
|
* Definition for the invoice tax data structure
|
||||||
|
*/
|
||||||
class InvoiceTaxData
|
class InvoiceTaxData
|
||||||
{
|
{
|
||||||
|
public int $updated_at;
|
||||||
|
|
||||||
public function __construct(public Response $origin)
|
public function __construct(public Response $origin)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class StoreSchedulerRequest extends Request
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'name' => ['bail', 'required', Rule::unique('schedulers')->where('company_id', auth()->user()->company()->id)],
|
'name' => 'bail|sometimes|nullable|string',
|
||||||
'is_paused' => 'bail|sometimes|boolean',
|
'is_paused' => 'bail|sometimes|boolean',
|
||||||
'frequency_id' => 'bail|sometimes|integer|digits_between:1,12',
|
'frequency_id' => 'bail|sometimes|integer|digits_between:1,12',
|
||||||
'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
|
'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
|
||||||
|
@ -29,7 +29,7 @@ class UpdateSchedulerRequest extends Request
|
|||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'name' => ['bail', 'sometimes', Rule::unique('schedulers')->where('company_id', auth()->user()->company()->id)->ignore($this->task_scheduler->id)],
|
'name' => 'bail|sometimes|nullable|string',
|
||||||
'is_paused' => 'bail|sometimes|boolean',
|
'is_paused' => 'bail|sometimes|boolean',
|
||||||
'frequency_id' => 'bail|sometimes|integer|digits_between:1,12',
|
'frequency_id' => 'bail|sometimes|integer|digits_between:1,12',
|
||||||
'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
|
'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
|
||||||
|
@ -134,6 +134,10 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankIntegration> $bank_integrations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Account extends BaseModel
|
class Account extends BaseModel
|
||||||
|
@ -33,6 +33,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|BankAccount withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|BankAccount withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BankAccount withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|BankAccount withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankSubaccount> $bank_subaccounts
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankSubaccount> $bank_subaccounts
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankSubaccount> $bank_subaccounts
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class BankAccount extends BaseModel
|
class BankAccount extends BaseModel
|
||||||
|
@ -76,6 +76,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|BankIntegration withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|BankIntegration withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BankIntegration withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|BankIntegration withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $transactions
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $transactions
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\BankTransaction> $transactions
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class BankIntegration extends BaseModel
|
class BankIntegration extends BaseModel
|
||||||
|
@ -185,6 +185,25 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Client wherePaymentBalance($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|Client wherePaymentBalance($value)
|
||||||
|
* @property mixed $tax_data
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
|
||||||
|
* @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\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $gateway_tokens
|
||||||
|
* @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\Payment> $payments
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $primary_contact
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
||||||
|
* @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\SystemLog> $system_logs
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|Client whereTaxData($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Client extends BaseModel implements HasLocalePreference
|
class Client extends BaseModel implements HasLocalePreference
|
||||||
@ -255,6 +274,7 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
'created_at' => 'timestamp',
|
'created_at' => 'timestamp',
|
||||||
'deleted_at' => 'timestamp',
|
'deleted_at' => 'timestamp',
|
||||||
'last_login' => 'timestamp',
|
'last_login' => 'timestamp',
|
||||||
|
'tax_data' => 'object',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $touches = [];
|
protected $touches = [];
|
||||||
|
@ -128,6 +128,11 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $quote_invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $quote_invitations
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $recurring_invoice_invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $recurring_invoice_invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CreditInvitation> $credit_invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation> $invoice_invitations
|
||||||
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $quote_invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $recurring_invoice_invitations
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class ClientContact extends Authenticatable implements HasLocalePreference
|
class ClientContact extends Authenticatable implements HasLocalePreference
|
||||||
|
@ -326,6 +326,56 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
* @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\Vendor> $vendors
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Webhook> $webhooks
|
||||||
|
* @property int $calculate_taxes
|
||||||
|
* @property int $tax_all_products
|
||||||
|
* @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)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Company extends BaseModel
|
class Company extends BaseModel
|
||||||
@ -363,6 +413,39 @@ class Company extends BaseModel
|
|||||||
|
|
||||||
protected $presenter = CompanyPresenter::class;
|
protected $presenter = CompanyPresenter::class;
|
||||||
|
|
||||||
|
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
|
||||||
|
];
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'invoice_task_hours',
|
'invoice_task_hours',
|
||||||
'markdown_enabled',
|
'markdown_enabled',
|
||||||
@ -448,6 +531,7 @@ class Company extends BaseModel
|
|||||||
'created_at' => 'timestamp',
|
'created_at' => 'timestamp',
|
||||||
'deleted_at' => 'timestamp',
|
'deleted_at' => 'timestamp',
|
||||||
'client_registration_fields' => 'array',
|
'client_registration_fields' => 'array',
|
||||||
|
'tax_data' => 'object',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $with = [];
|
protected $with = [];
|
||||||
@ -468,6 +552,16 @@ class Company extends BaseModel
|
|||||||
self::ENTITY_RECURRING_QUOTE => 2048,
|
self::ENTITY_RECURRING_QUOTE => 2048,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function shouldCalculateTax()
|
||||||
|
{
|
||||||
|
return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function refreshTaxData()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function documents()
|
public function documents()
|
||||||
{
|
{
|
||||||
return $this->morphMany(Document::class, 'documentable');
|
return $this->morphMany(Document::class, 'documentable');
|
||||||
|
@ -93,6 +93,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|CompanyGateway withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|CompanyGateway withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|CompanyGateway withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|CompanyGateway withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $client_gateway_tokens
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class CompanyGateway extends BaseModel
|
class CompanyGateway extends BaseModel
|
||||||
|
@ -70,6 +70,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $token
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $token
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $token
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class CompanyUser extends Pivot
|
class CompanyUser extends Pivot
|
||||||
|
@ -192,6 +192,13 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CreditInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CreditInvitation> $invitations
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CreditInvitation> $invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Credit extends BaseModel
|
class Credit extends BaseModel
|
||||||
|
@ -131,6 +131,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|Expense withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|Expense withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Expense withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|Expense withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Expense extends BaseModel
|
class Expense extends BaseModel
|
||||||
|
@ -29,6 +29,7 @@ namespace App\Models;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|GatewayType whereId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|GatewayType whereId($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|GatewayType whereName($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|GatewayType whereName($value)
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentType> $payment_methods
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentType> $payment_methods
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PaymentType> $payment_methods
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class GatewayType extends StaticModel
|
class GatewayType extends StaticModel
|
||||||
|
@ -56,6 +56,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|GroupSetting withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|GroupSetting withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class GroupSetting extends StaticModel
|
class GroupSetting extends StaticModel
|
||||||
|
@ -212,6 +212,17 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation> $invitations
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
||||||
|
* @property object|null $tax_data
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation> $invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereTaxData($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Invoice extends BaseModel
|
class Invoice extends BaseModel
|
||||||
@ -277,9 +288,6 @@ class Invoice extends BaseModel
|
|||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
// 'date' => 'date:Y-m-d',
|
|
||||||
// 'due_date' => 'date:Y-m-d',
|
|
||||||
// 'partial_due_date' => 'date:Y-m-d',
|
|
||||||
'line_items' => 'object',
|
'line_items' => 'object',
|
||||||
'backup' => 'object',
|
'backup' => 'object',
|
||||||
'updated_at' => 'timestamp',
|
'updated_at' => 'timestamp',
|
||||||
@ -287,6 +295,7 @@ class Invoice extends BaseModel
|
|||||||
'deleted_at' => 'timestamp',
|
'deleted_at' => 'timestamp',
|
||||||
'is_deleted' => 'bool',
|
'is_deleted' => 'bool',
|
||||||
'is_amount_discount' => 'bool',
|
'is_amount_discount' => 'bool',
|
||||||
|
'tax_data' => 'object',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $with = [];
|
protected $with = [];
|
||||||
|
@ -137,6 +137,11 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Paymentable> $paymentables
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Paymentable> $paymentables
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Paymentable> $paymentables
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Payment extends BaseModel
|
class Payment extends BaseModel
|
||||||
|
@ -97,6 +97,9 @@ use League\CommonMark\CommonMarkConverter;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|Product withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|Product withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Product withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|Product withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property int|null $tax_id
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|Product whereTaxId($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Product extends BaseModel
|
class Product extends BaseModel
|
||||||
|
@ -74,6 +74,8 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|Project withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|Project withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Project extends BaseModel
|
class Project extends BaseModel
|
||||||
|
@ -29,6 +29,7 @@ use App\Utils\Traits\MakesHash;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|Proposal query()
|
* @method static \Illuminate\Database\Eloquent\Builder|Proposal query()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Proposal extends BaseModel
|
class Proposal extends BaseModel
|
||||||
|
@ -186,6 +186,12 @@ use Illuminate\Support\Facades\Storage;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $invitations
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class PurchaseOrder extends BaseModel
|
class PurchaseOrder extends BaseModel
|
||||||
|
@ -185,6 +185,10 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $invitations
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Quote extends BaseModel
|
class Quote extends BaseModel
|
||||||
|
@ -140,6 +140,7 @@ use Illuminate\Support\Carbon;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class RecurringExpense extends BaseModel
|
class RecurringExpense extends BaseModel
|
||||||
|
@ -182,6 +182,13 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $invitations
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
|
* @property int $is_proforma
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|RecurringInvoice whereIsProforma($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class RecurringInvoice extends BaseModel
|
class RecurringInvoice extends BaseModel
|
||||||
|
@ -176,6 +176,11 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringQuoteInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringQuoteInvitation> $invitations
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringQuoteInvitation> $invitations
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class RecurringQuote extends BaseModel
|
class RecurringQuote extends BaseModel
|
||||||
|
@ -92,6 +92,7 @@ use Illuminate\Support\Carbon;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|Task withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|Task withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Task withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|Task withoutTrashed()
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Task extends BaseModel
|
class Task extends BaseModel
|
||||||
|
@ -146,6 +146,13 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $clients
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
|
||||||
|
* @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\Document> $documents
|
||||||
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class User extends Authenticatable implements MustVerifyEmail
|
class User extends Authenticatable implements MustVerifyEmail
|
||||||
|
@ -108,6 +108,10 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\VendorContact> $contacts
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\VendorContact> $contacts
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\VendorContact> $primary_contact
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\VendorContact> $primary_contact
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\VendorContact> $contacts
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\VendorContact> $primary_contact
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Vendor extends BaseModel
|
class Vendor extends BaseModel
|
||||||
|
@ -112,6 +112,8 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|VendorContact withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|VendorContact withoutTrashed()
|
||||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $purchase_order_invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $purchase_order_invitations
|
||||||
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $purchase_order_invitations
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class VendorContact extends Authenticatable implements HasLocalePreference
|
class VendorContact extends Authenticatable implements HasLocalePreference
|
||||||
|
@ -739,7 +739,9 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
$invoices_string = \implode(', ', collect($this->payment_hash->invoices())->pluck('invoice_number')->toArray()) ?: null;
|
$invoices_string = \implode(', ', collect($this->payment_hash->invoices())->pluck('invoice_number')->toArray()) ?: null;
|
||||||
$amount = Number::formatMoney($this->payment_hash?->amount_with_fee() ?: 0, $this->client);
|
$amount = Number::formatMoney($this->payment_hash?->amount_with_fee() ?: 0, $this->client);
|
||||||
|
|
||||||
if ($abbreviated || ! $invoices_string) {
|
if($abbreviated && $invoices_string){
|
||||||
|
return $invoices_string;
|
||||||
|
} elseif ($abbreviated || ! $invoices_string) {
|
||||||
return ctrans('texts.gateway_payment_text_no_invoice', [
|
return ctrans('texts.gateway_payment_text_no_invoice', [
|
||||||
'amount' => $amount,
|
'amount' => $amount,
|
||||||
'client' => $this->client->present()->name(),
|
'client' => $this->client->present()->name(),
|
||||||
|
@ -15,7 +15,7 @@ use App\Models\Scheduler;
|
|||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class ScheduleEntity
|
class EmailRecord
|
||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
|
@ -38,9 +38,9 @@ class SchedulerService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function schedule_entity()
|
private function email_record()
|
||||||
{
|
{
|
||||||
(new ScheduleEntity($this->scheduler))->run();
|
(new EmailRecord($this->scheduler))->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
59
app/Services/Tax/Providers/ZipTax.php
Normal file
59
app/Services/Tax/Providers/ZipTax.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
|
*
|
||||||
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
||||||
|
*
|
||||||
|
* @license https://www.elastic.co/licensing/elastic-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Services\Tax\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Client\Response;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
|
class ZipTax
|
||||||
|
{
|
||||||
|
|
||||||
|
private string $endpoint = 'https://api.zip-tax.com/request/v40';
|
||||||
|
|
||||||
|
public function __construct(protected string $api_key, protected string $address, protected ?string $postal_code)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
|
||||||
|
$response = $this->callApi(['key' => $this->api_key, 'address' => $this->address]);
|
||||||
|
|
||||||
|
if($response->successful())
|
||||||
|
return $response->json();
|
||||||
|
|
||||||
|
if($this->postal_code) {
|
||||||
|
$response = $this->callApi(['key' => $this->api_key, 'address' => $this->postal_code]);
|
||||||
|
|
||||||
|
if($response->successful())
|
||||||
|
return $response->json();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$response->throw();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* callApi
|
||||||
|
*
|
||||||
|
* @param array $parameters
|
||||||
|
* @return Response
|
||||||
|
*/
|
||||||
|
private function callApi(array $parameters): Response
|
||||||
|
{
|
||||||
|
$response = Http::retry(3, 1000)->withHeaders([])->get($this->endpoint, $parameters);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
namespace App\Services\Tax;
|
namespace App\Services\Tax;
|
||||||
|
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\Company;
|
||||||
|
|
||||||
|
|
||||||
class TaxService
|
class TaxService
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ return [
|
|||||||
|
|
||||||
'default' => env('CACHE_DRIVER', 'file'),
|
'default' => env('CACHE_DRIVER', 'file'),
|
||||||
|
|
||||||
'limiter' => 'redis',
|
'limiter' => env('LIMITER_DRIVER', null),
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Cache Stores
|
| Cache Stores
|
||||||
|
@ -14,8 +14,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => '5.5.96',
|
'app_version' => '5.5.97',
|
||||||
'app_tag' => '5.5.96',
|
'app_tag' => '5.5.97',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', ''),
|
'api_secret' => env('API_SECRET', ''),
|
||||||
|
@ -31,6 +31,18 @@ return new class extends Migration
|
|||||||
$table->boolean('tax_data');
|
$table->boolean('tax_data');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Schema::table('schedulers', function (Blueprint $table){
|
||||||
|
$table->dropUnique('schedulers_company_id_name_unique');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('schedulers', function (Blueprint $table) {
|
||||||
|
$table->string('name', 191)->nullable()->change();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +30,7 @@ use Illuminate\Routing\Middleware\ThrottleRequests;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @covers App\Services\Scheduler\SchedulerEntity
|
* @covers App\Services\Scheduler\EmailRecord
|
||||||
*/
|
*/
|
||||||
class ScheduleEntityTest extends TestCase
|
class ScheduleEntityTest extends TestCase
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@ class ScheduleEntityTest extends TestCase
|
|||||||
'name' => 'A test entity email scheduler',
|
'name' => 'A test entity email scheduler',
|
||||||
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
||||||
'next_run' => now()->format('Y-m-d'),
|
'next_run' => now()->format('Y-m-d'),
|
||||||
'template' => 'schedule_entity',
|
'template' => 'email_record',
|
||||||
'parameters' => [
|
'parameters' => [
|
||||||
'entity' => 'invoice',
|
'entity' => 'invoice',
|
||||||
'entity_id' => $this->invoice->hashed_id,
|
'entity_id' => $this->invoice->hashed_id,
|
||||||
@ -86,7 +86,7 @@ class ScheduleEntityTest extends TestCase
|
|||||||
'name' => 'A test entity email scheduler',
|
'name' => 'A test entity email scheduler',
|
||||||
'frequency_id' => 0,
|
'frequency_id' => 0,
|
||||||
'next_run' => now()->format('Y-m-d'),
|
'next_run' => now()->format('Y-m-d'),
|
||||||
'template' => 'schedule_entity',
|
'template' => 'email_record',
|
||||||
'parameters' => [
|
'parameters' => [
|
||||||
'entity' => 'invoice',
|
'entity' => 'invoice',
|
||||||
'entity_id' => $this->invoice->hashed_id,
|
'entity_id' => $this->invoice->hashed_id,
|
||||||
@ -108,7 +108,7 @@ class ScheduleEntityTest extends TestCase
|
|||||||
$data = [
|
$data = [
|
||||||
'name' => 'A test entity email scheduler',
|
'name' => 'A test entity email scheduler',
|
||||||
'next_run' => now()->format('Y-m-d'),
|
'next_run' => now()->format('Y-m-d'),
|
||||||
'template' => 'schedule_entity',
|
'template' => 'email_record',
|
||||||
'parameters' => [
|
'parameters' => [
|
||||||
'entity' => 'invoice',
|
'entity' => 'invoice',
|
||||||
'entity_id' => $this->invoice->hashed_id,
|
'entity_id' => $this->invoice->hashed_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user