Merge pull request #9569 from beganovich/laravel11

Upgrade to Laravel 11
This commit is contained in:
David Bomba 2024-06-22 14:00:35 +10:00 committed by GitHub
commit b35c0fc974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 923 additions and 1408 deletions

View File

@ -30,7 +30,7 @@ class ProRata
*/ */
public function refund(float $amount, Carbon $from_date, Carbon $to_date, int $frequency): float public function refund(float $amount, Carbon $from_date, Carbon $to_date, int $frequency): float
{ {
$days = $from_date->copy()->diffInDays($to_date); $days = intval(abs($from_date->copy()->diffInDays($to_date)));
$days_in_frequency = $this->getDaysInFrequency($frequency); $days_in_frequency = $this->getDaysInFrequency($frequency);
return round((($days / $days_in_frequency) * $amount), 2); return round((($days / $days_in_frequency) * $amount), 2);
@ -48,7 +48,7 @@ class ProRata
*/ */
public function charge(float $amount, Carbon $from_date, Carbon $to_date, int $frequency): float public function charge(float $amount, Carbon $from_date, Carbon $to_date, int $frequency): float
{ {
$days = $from_date->copy()->diffInDays($to_date); $days = intval(abs($from_date->copy()->diffInDays($to_date)));
$days_in_frequency = $this->getDaysInFrequency($frequency); $days_in_frequency = $this->getDaysInFrequency($frequency);
return round((($days / $days_in_frequency) * $amount), 2); return round((($days / $days_in_frequency) * $amount), 2);
@ -107,23 +107,23 @@ class ProRata
case RecurringInvoice::FREQUENCY_TWO_WEEKS: case RecurringInvoice::FREQUENCY_TWO_WEEKS:
return 14; return 14;
case RecurringInvoice::FREQUENCY_FOUR_WEEKS: case RecurringInvoice::FREQUENCY_FOUR_WEEKS:
return now()->diffInDays(now()->addWeeks(4)); return intval(abs(now()->diffInDays(now()->addWeeks(4))));
case RecurringInvoice::FREQUENCY_MONTHLY: case RecurringInvoice::FREQUENCY_MONTHLY:
return now()->diffInDays(now()->addMonthNoOverflow()); return intval(abs(now()->diffInDays(now()->addMonthNoOverflow())));
case RecurringInvoice::FREQUENCY_TWO_MONTHS: case RecurringInvoice::FREQUENCY_TWO_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(2)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(2))));
case RecurringInvoice::FREQUENCY_THREE_MONTHS: case RecurringInvoice::FREQUENCY_THREE_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(3)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(3))));
case RecurringInvoice::FREQUENCY_FOUR_MONTHS: case RecurringInvoice::FREQUENCY_FOUR_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(4)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(4))));
case RecurringInvoice::FREQUENCY_SIX_MONTHS: case RecurringInvoice::FREQUENCY_SIX_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(6)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(6))));
case RecurringInvoice::FREQUENCY_ANNUALLY: case RecurringInvoice::FREQUENCY_ANNUALLY:
return now()->diffInDays(now()->addYear()); return intval(abs(now()->diffInDays(now()->addYear())));
case RecurringInvoice::FREQUENCY_TWO_YEARS: case RecurringInvoice::FREQUENCY_TWO_YEARS:
return now()->diffInDays(now()->addYears(2)); return intval(abs(now()->diffInDays(now()->addYears(2))));
case RecurringInvoice::FREQUENCY_THREE_YEARS: case RecurringInvoice::FREQUENCY_THREE_YEARS:
return now()->diffInDays(now()->addYears(3)); return intval(abs(now()->diffInDays(now()->addYears(3))));
default: default:
return 0; return 0;
} }

View File

@ -77,7 +77,7 @@ class RefundCancelledAccount implements ShouldQueue
$end_date = Carbon::parse($plan_expires); $end_date = Carbon::parse($plan_expires);
$now = Carbon::now(); $now = Carbon::now();
$days_left = $now->diffInDays($end_date); $days_left = intval(abs($now->diffInDays($end_date)));
$pro_rata_ratio = $days_left / 365; $pro_rata_ratio = $days_left / 365;

View File

@ -623,7 +623,7 @@ class Account extends BaseModel
$plan_expires = Carbon::parse($this->plan_expires); $plan_expires = Carbon::parse($this->plan_expires);
if ($plan_expires->gt(now())) { if ($plan_expires->gt(now())) {
$diff = $plan_expires->diffInDays(); $diff = intval(abs($plan_expires->diffInDays()));
if ($diff > 14) { if ($diff > 14) {
return 0; return 0;

View File

@ -124,7 +124,7 @@ class ARDetailReport extends BaseExport
$client->present()->name(), $client->present()->name(),
$client->number, $client->number,
$client->id_number, $client->id_number,
Carbon::parse($invoice->due_date)->diffInDays(now()), intval(abs(Carbon::parse($invoice->due_date)->diffInDays(now()))),
Number::formatMoney($invoice->amount, $client), Number::formatMoney($invoice->amount, $client),
Number::formatMoney($invoice->balance, $client), Number::formatMoney($invoice->balance, $client),
]; ];

View File

@ -416,7 +416,7 @@ class SubscriptionService
$current_date = now(); $current_date = now();
$days_of_subscription_used = $start_date->diffInDays($current_date); $days_of_subscription_used = intval(abs($start_date->diffInDays($current_date)));
$days_in_frequency = $this->getDaysInFrequency(); $days_in_frequency = $this->getDaysInFrequency();
@ -441,7 +441,7 @@ class SubscriptionService
$current_date = now(); $current_date = now();
$days_of_subscription_used = $start_date->diffInDays($current_date); $days_of_subscription_used = intval(abs($start_date->diffInDays($current_date)));
if ($subscription) { if ($subscription) {
$days_in_frequency = $subscription->service()->getDaysInFrequency(); $days_in_frequency = $subscription->service()->getDaysInFrequency();
@ -481,7 +481,7 @@ class SubscriptionService
$current_date = now(); $current_date = now();
$days_of_subscription_used = $start_date->diffInDays($current_date); $days_of_subscription_used = intval(abs($start_date->diffInDays($current_date)));
$days_in_frequency = $invoice->subscription->service()->getDaysInFrequency(); $days_in_frequency = $invoice->subscription->service()->getDaysInFrequency();
@ -543,7 +543,7 @@ class SubscriptionService
$current_date = now(); $current_date = now();
$days_to_charge = $start_date->diffInDays($current_date); $days_to_charge = intval(abs($start_date->diffInDays($current_date)));
$days_in_frequency = $this->getDaysInFrequency(); $days_in_frequency = $this->getDaysInFrequency();
@ -1363,23 +1363,23 @@ class SubscriptionService
case RecurringInvoice::FREQUENCY_TWO_WEEKS: case RecurringInvoice::FREQUENCY_TWO_WEEKS:
return 14; return 14;
case RecurringInvoice::FREQUENCY_FOUR_WEEKS: case RecurringInvoice::FREQUENCY_FOUR_WEEKS:
return now()->diffInDays(now()->addWeeks(4)); return intval(abs(now()->diffInDays(now()->addWeeks(4))));
case RecurringInvoice::FREQUENCY_MONTHLY: case RecurringInvoice::FREQUENCY_MONTHLY:
return now()->diffInDays(now()->addMonthNoOverflow()); return intval(abs(now()->diffInDays(now()->addMonthNoOverflow())));
case RecurringInvoice::FREQUENCY_TWO_MONTHS: case RecurringInvoice::FREQUENCY_TWO_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(2)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(2))));
case RecurringInvoice::FREQUENCY_THREE_MONTHS: case RecurringInvoice::FREQUENCY_THREE_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(3)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(3))));
case RecurringInvoice::FREQUENCY_FOUR_MONTHS: case RecurringInvoice::FREQUENCY_FOUR_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(4)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(4))));
case RecurringInvoice::FREQUENCY_SIX_MONTHS: case RecurringInvoice::FREQUENCY_SIX_MONTHS:
return now()->diffInDays(now()->addMonthsNoOverflow(6)); return intval(abs(now()->diffInDays(now()->addMonthsNoOverflow(6))));
case RecurringInvoice::FREQUENCY_ANNUALLY: case RecurringInvoice::FREQUENCY_ANNUALLY:
return now()->diffInDays(now()->addYear()); return intval(abs(now()->diffInDays(now()->addYear())));
case RecurringInvoice::FREQUENCY_TWO_YEARS: case RecurringInvoice::FREQUENCY_TWO_YEARS:
return now()->diffInDays(now()->addYears(2)); return intval(abs(now()->diffInDays(now()->addYears(2))));
case RecurringInvoice::FREQUENCY_THREE_YEARS: case RecurringInvoice::FREQUENCY_THREE_YEARS:
return now()->diffInDays(now()->addYears(3)); return intval(abs(now()->diffInDays(now()->addYears(3))));
default: default:
return 0; return 0;
} }

View File

@ -101,7 +101,7 @@ class SubscriptionStatus extends AbstractService
$subscription_start_date = Carbon::parse($primary_invoice->date)->startOfDay(); $subscription_start_date = Carbon::parse($primary_invoice->date)->startOfDay();
$days_of_subscription_used = $subscription_start_date->copy()->diffInDays(now()); $days_of_subscription_used = intval(abs($subscription_start_date->copy()->diffInDays(now())));
return 1 - ($days_of_subscription_used / $this->recurring_invoice->subscription->service()->getDaysInFrequency()); return 1 - ($days_of_subscription_used / $this->recurring_invoice->subscription->service()->getDaysInFrequency());

View File

@ -58,7 +58,7 @@ trait HasRecurrence
//If the set date is less than the original date we need to add a month. //If the set date is less than the original date we need to add a month.
//If we are overflowing dates, then we need to diff the dates and ensure it doesn't equal 0 //If we are overflowing dates, then we need to diff the dates and ensure it doesn't equal 0
if ($set_date->lte($date) || $set_date->diffInDays($carbon_date) == 0) { if ($set_date->lte($date) || intval(abs($set_date->diffInDays($carbon_date))) == 0) {
$set_date->addMonthNoOverflow(); $set_date->addMonthNoOverflow();
} }

View File

@ -35,16 +35,17 @@
"ext-dom": "*", "ext-dom": "*",
"ext-json": "*", "ext-json": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-curl": "*",
"afosto/yaac": "^1.4", "afosto/yaac": "^1.4",
"asm/php-ansible": "^4.0", "asm/php-ansible": "dev-main",
"authorizenet/authorizenet": "^2.0", "authorizenet/authorizenet": "^2.0",
"awobaz/compoships": "^2.1", "awobaz/compoships": "^2.1",
"bacon/bacon-qr-code": "^2.0", "bacon/bacon-qr-code": "^2.0",
"beganovich/snappdf": "^4", "beganovich/snappdf": "^5",
"braintree/braintree_php": "^6.0", "braintree/braintree_php": "^6.0",
"btcpayserver/btcpayserver-greenfield-php": "^2.6", "btcpayserver/btcpayserver-greenfield-php": "^2.6",
"checkout/checkout-sdk-php": "^3.0", "checkout/checkout-sdk-php": "^3.0",
"doctrine/dbal": "^3.0", "doctrine/dbal": "^4.0",
"eway/eway-rapid-php": "^1.3", "eway/eway-rapid-php": "^1.3",
"fakerphp/faker": "^1.14", "fakerphp/faker": "^1.14",
"getbrevo/brevo-php": "^1.0", "getbrevo/brevo-php": "^1.0",
@ -53,20 +54,20 @@
"guzzlehttp/guzzle": "^7.2", "guzzlehttp/guzzle": "^7.2",
"halaxa/json-machine": "^0.7.0", "halaxa/json-machine": "^0.7.0",
"hashids/hashids": "^4.0", "hashids/hashids": "^4.0",
"hedii/laravel-gelf-logger": "^8", "hedii/laravel-gelf-logger": "^9",
"horstoeko/orderx": "dev-master", "horstoeko/orderx": "dev-master",
"horstoeko/zugferd": "^1", "horstoeko/zugferd": "^1",
"horstoeko/zugferdvisualizer":"^1", "horstoeko/zugferdvisualizer":"^1",
"hyvor/php-json-exporter": "^0.0.3", "hyvor/php-json-exporter": "^0.0.3",
"imdhemy/laravel-purchases": "^1.7", "imdhemy/laravel-purchases": "^1.7",
"intervention/image": "^2.5", "intervention/image": "^2.5",
"invoiceninja/inspector": "^3.0",
"invoiceninja/einvoice": "dev-main", "invoiceninja/einvoice": "dev-main",
"invoiceninja/inspector": "^2.0",
"invoiceninja/ubl_invoice": "^2", "invoiceninja/ubl_invoice": "^2",
"josemmo/facturae-php": "^1.7", "josemmo/facturae-php": "^1.7",
"laracasts/presenter": "^0.2.1", "laracasts/presenter": "^0.2.1",
"laravel/framework": "^10", "laravel/framework": "^11.0",
"laravel/slack-notification-channel": "^2.2", "laravel/slack-notification-channel": "^3",
"laravel/socialite": "^5", "laravel/socialite": "^5",
"laravel/tinker": "^2.7", "laravel/tinker": "^2.7",
"laravel/ui": "^4.0", "laravel/ui": "^4.0",
@ -87,7 +88,7 @@
"psr/http-message": "^1.0", "psr/http-message": "^1.0",
"pusher/pusher-php-server": "^7.2", "pusher/pusher-php-server": "^7.2",
"razorpay/razorpay": "2.*", "razorpay/razorpay": "2.*",
"sentry/sentry-laravel": "^3", "sentry/sentry-laravel": "^4",
"setasign/fpdf": "^1.8", "setasign/fpdf": "^1.8",
"setasign/fpdi": "^2.3", "setasign/fpdi": "^2.3",
"socialiteproviders/apple": "dev-master", "socialiteproviders/apple": "dev-master",
@ -99,25 +100,23 @@
"symfony/http-client": "^6.0", "symfony/http-client": "^6.0",
"symfony/mailgun-mailer": "^6.1", "symfony/mailgun-mailer": "^6.1",
"symfony/postmark-mailer": "^6.1", "symfony/postmark-mailer": "^6.1",
"turbo124/beacon": "^1.5", "turbo124/beacon": "^2.0",
"twig/intl-extra": "^3.7", "twig/intl-extra": "^3.7",
"twig/twig": "^3", "twig/twig": "^3",
"twilio/sdk": "^6.40", "twilio/sdk": "^6.40",
"wildbit/postmark-php": "^4.0" "wildbit/postmark-php": "^4.0"
}, },
"require-dev": { "require-dev": {
"php": "^8.2",
"barryvdh/laravel-debugbar": "^3.6", "barryvdh/laravel-debugbar": "^3.6",
"barryvdh/laravel-ide-helper": "^2.13", "barryvdh/laravel-ide-helper": "^3.0",
"beyondcode/laravel-query-detector": "^1.8",
"brianium/paratest": "^7", "brianium/paratest": "^7",
"filp/whoops": "^2.7", "filp/whoops": "^2.7",
"friendsofphp/php-cs-fixer": "^3.14", "friendsofphp/php-cs-fixer": "^3.14",
"laracasts/cypress": "^3.0", "laracasts/cypress": "^3.0",
"larastan/larastan": "^2", "larastan/larastan": "^2",
"mockery/mockery": "^1.4.4", "mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0", "nunomaduro/collision": "^8.1",
"phpstan/phpstan": "^1.11", "phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^10", "phpunit/phpunit": "^10",
"spatie/laravel-ignition": "^2.0", "spatie/laravel-ignition": "^2.0",
"spaze/phpstan-stripe": "^3.0" "spaze/phpstan-stripe": "^3.0"
@ -186,6 +185,10 @@
{ {
"type": "vcs", "type": "vcs",
"url": "https://github.com/turbo124/orderx" "url": "https://github.com/turbo124/orderx"
},
{
"type": "vcs",
"url": "https://github.com/beganovich/php-ansible"
} }
], ],
"minimum-stability": "dev", "minimum-stability": "dev",

1632
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -49,4 +49,5 @@ return [
'time' => 4, 'time' => 4,
], ],
'rehash_on_login' => false,
]; ];

View File

@ -1,70 +0,0 @@
<?php
return [
/*
* Enable or disable the query detection.
* If this is set to "null", the app.debug config value will be used.
*/
'enabled' => env('QUERY_DETECTOR_ENABLED', false),
/*
* Threshold level for the N+1 query detection. If a relation query will be
* executed more then this amount, the detector will notify you about it.
*/
'threshold' => (int) env('QUERY_DETECTOR_THRESHOLD', 3),
/*
* Here you can whitelist model relations.
*
* Right now, you need to define the model relation both as the class name and the attribute name on the model.
* So if an "Author" model would have a "posts" relation that points to a "Post" class, you need to add both
* the "posts" attribute and the "Post::class", since the relation can get resolved in multiple ways.
*/
'except' => [
//Author::class => [
// Post::class,
// 'posts',
//]
],
/*
* Here you can set a specific log channel to write to
* in case you are trying to isolate queries or have a lot
* going on in the laravel.log. Defaults to laravel.log though.
*/
'log_channel' => env('QUERY_DETECTOR_LOG_CHANNEL', 'daily'),
/*
* Define the output format that you want to use. Multiple classes are supported.
* Available options are:
*
* Alert:
* Displays an alert on the website
* \BeyondCode\QueryDetector\Outputs\Alert::class
*
* Console:
* Writes the N+1 queries into your browsers console log
* \BeyondCode\QueryDetector\Outputs\Console::class
*
* Clockwork: (make sure you have the itsgoingd/clockwork package installed)
* Writes the N+1 queries warnings to Clockwork log
* \BeyondCode\QueryDetector\Outputs\Clockwork::class
*
* Debugbar: (make sure you have the barryvdh/laravel-debugbar package installed)
* Writes the N+1 queries into a custom messages collector of Debugbar
* \BeyondCode\QueryDetector\Outputs\Debugbar::class
*
* JSON:
* Writes the N+1 queries into the response body of your JSON responses
* \BeyondCode\QueryDetector\Outputs\Json::class
*
* Log:
* Writes the N+1 queries into the Laravel.log file
* \BeyondCode\QueryDetector\Outputs\Log::class
*/
'output' => [
//\BeyondCode\QueryDetector\Outputs\Alert::class,
\BeyondCode\QueryDetector\Outputs\Log::class,
//\BeyondCode\QueryDetector\Outputs\Json::class,
],
];

View File

@ -49,6 +49,7 @@ CREATE TABLE `accounts` (
`account_sms_verified` tinyint(1) NOT NULL DEFAULT 0, `account_sms_verified` tinyint(1) NOT NULL DEFAULT 0,
`bank_integration_account_id` text DEFAULT NULL, `bank_integration_account_id` text DEFAULT NULL,
`is_trial` tinyint(1) NOT NULL DEFAULT 0, `is_trial` tinyint(1) NOT NULL DEFAULT 0,
`email_quota` int(11) DEFAULT 20,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `accounts_payment_id_index` (`payment_id`), KEY `accounts_payment_id_index` (`payment_id`),
KEY `accounts_key_index` (`key`) KEY `accounts_key_index` (`key`)
@ -169,6 +170,9 @@ CREATE TABLE `bank_integrations` (
`deleted_at` timestamp(6) NULL DEFAULT NULL, `deleted_at` timestamp(6) NULL DEFAULT NULL,
`disabled_upstream` tinyint(1) NOT NULL DEFAULT 0, `disabled_upstream` tinyint(1) NOT NULL DEFAULT 0,
`auto_sync` tinyint(1) NOT NULL DEFAULT 0, `auto_sync` tinyint(1) NOT NULL DEFAULT 0,
`integration_type` varchar(191) DEFAULT NULL,
`nordigen_account_id` varchar(191) DEFAULT NULL,
`nordigen_institution_id` varchar(191) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `bank_integrations_user_id_foreign` (`user_id`), KEY `bank_integrations_user_id_foreign` (`user_id`),
KEY `bank_integrations_account_id_foreign` (`account_id`), KEY `bank_integrations_account_id_foreign` (`account_id`),
@ -248,7 +252,7 @@ CREATE TABLE `bank_transactions` (
`bank_account_id` bigint(20) unsigned NOT NULL, `bank_account_id` bigint(20) unsigned NOT NULL,
`description` text DEFAULT NULL, `description` text DEFAULT NULL,
`invoice_ids` text NOT NULL DEFAULT '', `invoice_ids` text NOT NULL DEFAULT '',
`expense_id` int(10) unsigned DEFAULT NULL, `expense_id` text DEFAULT '',
`vendor_id` int(10) unsigned DEFAULT NULL, `vendor_id` int(10) unsigned DEFAULT NULL,
`status_id` int(10) unsigned NOT NULL DEFAULT 1, `status_id` int(10) unsigned NOT NULL DEFAULT 1,
`is_deleted` tinyint(1) NOT NULL DEFAULT 0, `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
@ -257,6 +261,9 @@ CREATE TABLE `bank_transactions` (
`deleted_at` timestamp(6) NULL DEFAULT NULL, `deleted_at` timestamp(6) NULL DEFAULT NULL,
`bank_transaction_rule_id` bigint(20) DEFAULT NULL, `bank_transaction_rule_id` bigint(20) DEFAULT NULL,
`payment_id` int(10) unsigned DEFAULT NULL, `payment_id` int(10) unsigned DEFAULT NULL,
`participant` varchar(191) DEFAULT NULL,
`participant_name` varchar(191) DEFAULT NULL,
`nordigen_transaction_id` text DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `bank_transactions_bank_integration_id_foreign` (`bank_integration_id`), KEY `bank_transactions_bank_integration_id_foreign` (`bank_integration_id`),
KEY `bank_transactions_user_id_foreign` (`user_id`), KEY `bank_transactions_user_id_foreign` (`user_id`),
@ -433,6 +440,12 @@ CREATE TABLE `clients` (
`updated_at` timestamp(6) NULL DEFAULT NULL, `updated_at` timestamp(6) NULL DEFAULT NULL,
`deleted_at` timestamp(6) NULL DEFAULT NULL, `deleted_at` timestamp(6) NULL DEFAULT NULL,
`id_number` varchar(191) DEFAULT NULL, `id_number` varchar(191) DEFAULT NULL,
`payment_balance` decimal(20,6) NOT NULL DEFAULT 0.000000,
`routing_id` varchar(191) DEFAULT NULL,
`tax_data` mediumtext DEFAULT NULL,
`is_tax_exempt` tinyint(1) NOT NULL DEFAULT 0,
`has_valid_vat_number` tinyint(1) NOT NULL DEFAULT 0,
`classification` varchar(191) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `clients_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `clients_company_id_number_unique` (`company_id`,`number`),
KEY `clients_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `clients_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -527,6 +540,23 @@ CREATE TABLE `companies` (
`convert_expense_currency` tinyint(1) NOT NULL DEFAULT 0, `convert_expense_currency` tinyint(1) NOT NULL DEFAULT 0,
`notify_vendor_when_paid` tinyint(1) NOT NULL DEFAULT 0, `notify_vendor_when_paid` tinyint(1) NOT NULL DEFAULT 0,
`invoice_task_hours` tinyint(1) NOT NULL DEFAULT 0, `invoice_task_hours` tinyint(1) NOT NULL DEFAULT 0,
`calculate_taxes` tinyint(1) NOT NULL DEFAULT 0,
`tax_data` mediumtext DEFAULT NULL,
`shopify_name` varchar(191) DEFAULT NULL,
`shopify_access_token` varchar(191) DEFAULT NULL,
`e_invoice_certificate` text DEFAULT NULL,
`e_invoice_certificate_passphrase` text DEFAULT NULL,
`origin_tax_data` text DEFAULT NULL,
`invoice_task_project_header` tinyint(1) NOT NULL DEFAULT 1,
`invoice_task_item_description` tinyint(1) NOT NULL DEFAULT 1,
`smtp_host` varchar(191) DEFAULT NULL,
`smtp_port` int(10) unsigned DEFAULT NULL,
`smtp_encryption` varchar(191) DEFAULT NULL,
`smtp_username` text DEFAULT NULL,
`smtp_password` text DEFAULT NULL,
`smtp_local_domain` varchar(191) DEFAULT NULL,
`smtp_verify_peer` tinyint(1) NOT NULL DEFAULT 1,
`e_invoice` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `companies_company_key_unique` (`company_key`), UNIQUE KEY `companies_company_key_unique` (`company_key`),
KEY `companies_industry_id_foreign` (`industry_id`), KEY `companies_industry_id_foreign` (`industry_id`),
@ -535,6 +565,8 @@ CREATE TABLE `companies` (
KEY `companies_subdomain_portal_mode_index` (`subdomain`,`portal_mode`), KEY `companies_subdomain_portal_mode_index` (`subdomain`,`portal_mode`),
KEY `companies_portal_domain_portal_mode_index` (`portal_domain`,`portal_mode`), KEY `companies_portal_domain_portal_mode_index` (`portal_domain`,`portal_mode`),
KEY `companies_company_key_index` (`company_key`), KEY `companies_company_key_index` (`company_key`),
KEY `companies_shopify_name_index` (`shopify_name`),
KEY `companies_shopify_access_token_index` (`shopify_access_token`),
CONSTRAINT `companies_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `companies_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `companies_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`), CONSTRAINT `companies_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`),
CONSTRAINT `companies_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) CONSTRAINT `companies_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`)
@ -570,6 +602,11 @@ CREATE TABLE `company_gateways` (
`require_client_phone` tinyint(1) NOT NULL DEFAULT 0, `require_client_phone` tinyint(1) NOT NULL DEFAULT 0,
`require_contact_name` tinyint(1) NOT NULL DEFAULT 0, `require_contact_name` tinyint(1) NOT NULL DEFAULT 0,
`require_contact_email` tinyint(1) NOT NULL DEFAULT 0, `require_contact_email` tinyint(1) NOT NULL DEFAULT 0,
`require_custom_value1` tinyint(1) NOT NULL DEFAULT 0,
`require_custom_value2` tinyint(1) NOT NULL DEFAULT 0,
`require_custom_value3` tinyint(1) NOT NULL DEFAULT 0,
`require_custom_value4` tinyint(1) NOT NULL DEFAULT 0,
`always_show_required_fields` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `company_gateways_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `company_gateways_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `company_gateways_gateway_key_foreign` (`gateway_key`), KEY `company_gateways_gateway_key_foreign` (`gateway_key`),
@ -649,6 +686,7 @@ CREATE TABLE `company_user` (
`updated_at` timestamp(6) NULL DEFAULT NULL, `updated_at` timestamp(6) NULL DEFAULT NULL,
`permissions_updated_at` timestamp NOT NULL DEFAULT current_timestamp(), `permissions_updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
`ninja_portal_url` text NOT NULL DEFAULT '', `ninja_portal_url` text NOT NULL DEFAULT '',
`react_settings` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `company_user_company_id_user_id_unique` (`company_id`,`user_id`), UNIQUE KEY `company_user_company_id_user_id_unique` (`company_id`,`user_id`),
KEY `company_user_account_id_company_id_deleted_at_index` (`account_id`,`company_id`,`deleted_at`), KEY `company_user_account_id_company_id_deleted_at_index` (`account_id`,`company_id`,`deleted_at`),
@ -735,7 +773,7 @@ CREATE TABLE `credits` (
`design_id` int(10) unsigned DEFAULT NULL, `design_id` int(10) unsigned DEFAULT NULL,
`invoice_id` int(10) unsigned DEFAULT NULL, `invoice_id` int(10) unsigned DEFAULT NULL,
`number` varchar(191) DEFAULT NULL, `number` varchar(191) DEFAULT NULL,
`discount` double(8,2) NOT NULL DEFAULT 0.00, `discount` decimal(20,6) NOT NULL DEFAULT 0.000000,
`is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0,
`po_number` varchar(191) DEFAULT NULL, `po_number` varchar(191) DEFAULT NULL,
`date` date DEFAULT NULL, `date` date DEFAULT NULL,
@ -784,6 +822,8 @@ CREATE TABLE `credits` (
`reminder_last_sent` date DEFAULT NULL, `reminder_last_sent` date DEFAULT NULL,
`paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000,
`subscription_id` int(10) unsigned DEFAULT NULL, `subscription_id` int(10) unsigned DEFAULT NULL,
`tax_data` mediumtext DEFAULT NULL,
`e_invoice` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `credits_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `credits_company_id_number_unique` (`company_id`,`number`),
KEY `credits_user_id_foreign` (`user_id`), KEY `credits_user_id_foreign` (`user_id`),
@ -848,6 +888,8 @@ CREATE TABLE `designs` (
`created_at` timestamp(6) NULL DEFAULT NULL, `created_at` timestamp(6) NULL DEFAULT NULL,
`updated_at` timestamp(6) NULL DEFAULT NULL, `updated_at` timestamp(6) NULL DEFAULT NULL,
`deleted_at` timestamp(6) NULL DEFAULT NULL, `deleted_at` timestamp(6) NULL DEFAULT NULL,
`is_template` tinyint(1) NOT NULL DEFAULT 0,
`entities` text DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `designs_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `designs_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `designs_company_id_index` (`company_id`), KEY `designs_company_id_index` (`company_id`),
@ -959,6 +1001,7 @@ CREATE TABLE `expenses` (
`tax_amount3` decimal(20,6) NOT NULL DEFAULT 1.000000, `tax_amount3` decimal(20,6) NOT NULL DEFAULT 1.000000,
`uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0,
`calculate_tax_by_amount` tinyint(1) NOT NULL DEFAULT 0, `calculate_tax_by_amount` tinyint(1) NOT NULL DEFAULT 0,
`e_invoice` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `expenses_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `expenses_company_id_number_unique` (`company_id`,`number`),
KEY `expenses_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `expenses_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -1095,7 +1138,7 @@ CREATE TABLE `invoices` (
`recurring_id` int(10) unsigned DEFAULT NULL, `recurring_id` int(10) unsigned DEFAULT NULL,
`design_id` int(10) unsigned DEFAULT NULL, `design_id` int(10) unsigned DEFAULT NULL,
`number` varchar(191) DEFAULT NULL, `number` varchar(191) DEFAULT NULL,
`discount` double(8,2) NOT NULL DEFAULT 0.00, `discount` decimal(20,6) NOT NULL DEFAULT 0.000000,
`is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0,
`po_number` varchar(191) DEFAULT NULL, `po_number` varchar(191) DEFAULT NULL,
`date` date DEFAULT NULL, `date` date DEFAULT NULL,
@ -1147,6 +1190,8 @@ CREATE TABLE `invoices` (
`subscription_id` int(10) unsigned DEFAULT NULL, `subscription_id` int(10) unsigned DEFAULT NULL,
`auto_bill_tries` smallint(6) NOT NULL DEFAULT 0, `auto_bill_tries` smallint(6) NOT NULL DEFAULT 0,
`is_proforma` tinyint(1) NOT NULL DEFAULT 0, `is_proforma` tinyint(1) NOT NULL DEFAULT 0,
`tax_data` mediumtext DEFAULT NULL,
`e_invoice` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `invoices_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `invoices_company_id_number_unique` (`company_id`,`number`),
KEY `invoices_user_id_foreign` (`user_id`), KEY `invoices_user_id_foreign` (`user_id`),
@ -1344,6 +1389,8 @@ CREATE TABLE `payments` (
`custom_value4` text DEFAULT NULL, `custom_value4` text DEFAULT NULL,
`transaction_id` bigint(20) unsigned DEFAULT NULL, `transaction_id` bigint(20) unsigned DEFAULT NULL,
`idempotency_key` varchar(64) DEFAULT NULL, `idempotency_key` varchar(64) DEFAULT NULL,
`refund_meta` text DEFAULT NULL,
`category_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `payments_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `payments_company_id_number_unique` (`company_id`,`number`),
UNIQUE KEY `payments_company_id_idempotency_key_unique` (`company_id`,`idempotency_key`), UNIQUE KEY `payments_company_id_idempotency_key_unique` (`company_id`,`idempotency_key`),
@ -1395,6 +1442,9 @@ CREATE TABLE `products` (
`in_stock_quantity` int(11) NOT NULL DEFAULT 0, `in_stock_quantity` int(11) NOT NULL DEFAULT 0,
`stock_notification` tinyint(1) NOT NULL DEFAULT 1, `stock_notification` tinyint(1) NOT NULL DEFAULT 1,
`stock_notification_threshold` int(11) NOT NULL DEFAULT 0, `stock_notification_threshold` int(11) NOT NULL DEFAULT 0,
`max_quantity` int(10) unsigned DEFAULT NULL,
`product_image` varchar(191) DEFAULT NULL,
`tax_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `products_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `products_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `products_user_id_foreign` (`user_id`), KEY `products_user_id_foreign` (`user_id`),
@ -1430,6 +1480,7 @@ CREATE TABLE `projects` (
`is_deleted` tinyint(1) NOT NULL DEFAULT 0, `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
`number` varchar(191) DEFAULT NULL, `number` varchar(191) DEFAULT NULL,
`color` varchar(191) NOT NULL DEFAULT '#fff', `color` varchar(191) NOT NULL DEFAULT '#fff',
`current_hours` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `projects_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `projects_company_id_number_unique` (`company_id`,`number`),
KEY `projects_user_id_foreign` (`user_id`), KEY `projects_user_id_foreign` (`user_id`),
@ -1461,6 +1512,7 @@ CREATE TABLE `purchase_order_invitations` (
`updated_at` timestamp(6) NULL DEFAULT NULL, `updated_at` timestamp(6) NULL DEFAULT NULL,
`deleted_at` timestamp(6) NULL DEFAULT NULL, `deleted_at` timestamp(6) NULL DEFAULT NULL,
`email_status` enum('delivered','bounced','spam') DEFAULT NULL, `email_status` enum('delivered','bounced','spam') DEFAULT NULL,
`signature_ip` text DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `vendor_purchase_unique` (`vendor_contact_id`,`purchase_order_id`), UNIQUE KEY `vendor_purchase_unique` (`vendor_contact_id`,`purchase_order_id`),
KEY `purchase_order_invitations_user_id_foreign` (`user_id`), KEY `purchase_order_invitations_user_id_foreign` (`user_id`),
@ -1491,7 +1543,7 @@ CREATE TABLE `purchase_orders` (
`design_id` int(10) unsigned DEFAULT NULL, `design_id` int(10) unsigned DEFAULT NULL,
`invoice_id` int(10) unsigned DEFAULT NULL, `invoice_id` int(10) unsigned DEFAULT NULL,
`number` varchar(191) DEFAULT NULL, `number` varchar(191) DEFAULT NULL,
`discount` double(8,2) NOT NULL DEFAULT 0.00, `discount` decimal(20,6) NOT NULL DEFAULT 0.000000,
`is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0,
`po_number` varchar(191) DEFAULT NULL, `po_number` varchar(191) DEFAULT NULL,
`date` date DEFAULT NULL, `date` date DEFAULT NULL,
@ -1541,6 +1593,8 @@ CREATE TABLE `purchase_orders` (
`updated_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL,
`expense_id` int(10) unsigned DEFAULT NULL, `expense_id` int(10) unsigned DEFAULT NULL,
`currency_id` int(10) unsigned DEFAULT NULL, `currency_id` int(10) unsigned DEFAULT NULL,
`tax_data` mediumtext DEFAULT NULL,
`e_invoice` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `purchase_orders_user_id_foreign` (`user_id`), KEY `purchase_orders_user_id_foreign` (`user_id`),
KEY `purchase_orders_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `purchase_orders_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -1605,7 +1659,7 @@ CREATE TABLE `quotes` (
`design_id` int(10) unsigned DEFAULT NULL, `design_id` int(10) unsigned DEFAULT NULL,
`invoice_id` int(10) unsigned DEFAULT NULL, `invoice_id` int(10) unsigned DEFAULT NULL,
`number` varchar(191) DEFAULT NULL, `number` varchar(191) DEFAULT NULL,
`discount` double(8,2) NOT NULL DEFAULT 0.00, `discount` decimal(20,6) NOT NULL DEFAULT 0.000000,
`is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0,
`po_number` varchar(191) DEFAULT NULL, `po_number` varchar(191) DEFAULT NULL,
`date` date DEFAULT NULL, `date` date DEFAULT NULL,
@ -1654,6 +1708,8 @@ CREATE TABLE `quotes` (
`reminder_last_sent` date DEFAULT NULL, `reminder_last_sent` date DEFAULT NULL,
`paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000,
`subscription_id` int(10) unsigned DEFAULT NULL, `subscription_id` int(10) unsigned DEFAULT NULL,
`tax_data` mediumtext DEFAULT NULL,
`e_invoice` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `quotes_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `quotes_company_id_number_unique` (`company_id`,`number`),
KEY `quotes_user_id_foreign` (`user_id`), KEY `quotes_user_id_foreign` (`user_id`),
@ -1778,7 +1834,7 @@ CREATE TABLE `recurring_invoices` (
`vendor_id` int(10) unsigned DEFAULT NULL, `vendor_id` int(10) unsigned DEFAULT NULL,
`status_id` int(10) unsigned NOT NULL, `status_id` int(10) unsigned NOT NULL,
`number` varchar(191) DEFAULT NULL, `number` varchar(191) DEFAULT NULL,
`discount` double(8,2) NOT NULL DEFAULT 0.00, `discount` decimal(20,6) NOT NULL DEFAULT 0.000000,
`is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0,
`po_number` varchar(191) DEFAULT NULL, `po_number` varchar(191) DEFAULT NULL,
`date` date DEFAULT NULL, `date` date DEFAULT NULL,
@ -1830,6 +1886,7 @@ CREATE TABLE `recurring_invoices` (
`paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000,
`subscription_id` int(10) unsigned DEFAULT NULL, `subscription_id` int(10) unsigned DEFAULT NULL,
`next_send_date_client` datetime DEFAULT NULL, `next_send_date_client` datetime DEFAULT NULL,
`is_proforma` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `recurring_invoices_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `recurring_invoices_company_id_number_unique` (`company_id`,`number`),
KEY `recurring_invoices_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `recurring_invoices_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -1967,10 +2024,10 @@ CREATE TABLE `schedulers` (
`next_run` datetime DEFAULT NULL, `next_run` datetime DEFAULT NULL,
`next_run_client` datetime DEFAULT NULL, `next_run_client` datetime DEFAULT NULL,
`user_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL,
`name` varchar(191) NOT NULL, `name` varchar(191) DEFAULT NULL,
`template` varchar(191) NOT NULL, `template` varchar(191) NOT NULL,
`remaining_cycles` int(11) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `schedulers_company_id_name_unique` (`company_id`,`name`),
KEY `schedulers_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `schedulers_company_id_deleted_at_index` (`company_id`,`deleted_at`),
CONSTRAINT `schedulers_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE CONSTRAINT `schedulers_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@ -2023,6 +2080,7 @@ CREATE TABLE `subscriptions` (
`use_inventory_management` tinyint(1) NOT NULL DEFAULT 0, `use_inventory_management` tinyint(1) NOT NULL DEFAULT 0,
`optional_product_ids` text DEFAULT NULL, `optional_product_ids` text DEFAULT NULL,
`optional_recurring_product_ids` text DEFAULT NULL, `optional_recurring_product_ids` text DEFAULT NULL,
`steps` varchar(191) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `subscriptions_company_id_name_unique` (`company_id`,`name`), UNIQUE KEY `subscriptions_company_id_name_unique` (`company_id`,`name`),
KEY `billing_subscriptions_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `billing_subscriptions_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -2103,6 +2161,9 @@ CREATE TABLE `tasks` (
`invoice_documents` tinyint(1) NOT NULL DEFAULT 0, `invoice_documents` tinyint(1) NOT NULL DEFAULT 0,
`is_date_based` tinyint(1) NOT NULL DEFAULT 0, `is_date_based` tinyint(1) NOT NULL DEFAULT 0,
`status_order` int(11) DEFAULT NULL, `status_order` int(11) DEFAULT NULL,
`calculated_start_date` date DEFAULT NULL,
`hash` varchar(191) DEFAULT NULL,
`meta` text DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `tasks_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `tasks_company_id_number_unique` (`company_id`,`number`),
KEY `tasks_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `tasks_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -2110,6 +2171,7 @@ CREATE TABLE `tasks` (
KEY `tasks_invoice_id_foreign` (`invoice_id`), KEY `tasks_invoice_id_foreign` (`invoice_id`),
KEY `tasks_client_id_foreign` (`client_id`), KEY `tasks_client_id_foreign` (`client_id`),
KEY `tasks_company_id_index` (`company_id`), KEY `tasks_company_id_index` (`company_id`),
KEY `tasks_hash_index` (`hash`),
CONSTRAINT `tasks_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tasks_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `tasks_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tasks_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `tasks_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tasks_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
@ -2226,10 +2288,14 @@ CREATE TABLE `users` (
`oauth_user_token_expiry` datetime DEFAULT NULL, `oauth_user_token_expiry` datetime DEFAULT NULL,
`sms_verification_code` varchar(191) DEFAULT NULL, `sms_verification_code` varchar(191) DEFAULT NULL,
`verified_phone_number` tinyint(1) NOT NULL DEFAULT 0, `verified_phone_number` tinyint(1) NOT NULL DEFAULT 0,
`shopify_user_id` bigint(20) unsigned DEFAULT NULL,
`language_id` varchar(191) DEFAULT NULL,
`user_logged_in_notification` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`), UNIQUE KEY `users_email_unique` (`email`),
UNIQUE KEY `users_oauth_user_id_oauth_provider_id_unique` (`oauth_user_id`,`oauth_provider_id`), UNIQUE KEY `users_oauth_user_id_oauth_provider_id_unique` (`oauth_user_id`,`oauth_provider_id`),
KEY `users_account_id_index` (`account_id`), KEY `users_account_id_index` (`account_id`),
KEY `users_shopify_user_id_index` (`shopify_user_id`),
CONSTRAINT `users_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE CONSTRAINT `users_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -2318,6 +2384,9 @@ CREATE TABLE `vendors` (
`vendor_hash` text DEFAULT NULL, `vendor_hash` text DEFAULT NULL,
`public_notes` text DEFAULT NULL, `public_notes` text DEFAULT NULL,
`id_number` varchar(191) DEFAULT NULL, `id_number` varchar(191) DEFAULT NULL,
`language_id` int(10) unsigned DEFAULT NULL,
`last_login` timestamp NULL DEFAULT NULL,
`classification` varchar(191) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `vendors_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `vendors_company_id_number_unique` (`company_id`,`number`),
KEY `vendors_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `vendors_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -2339,7 +2408,7 @@ CREATE TABLE `webhooks` (
`user_id` int(10) unsigned DEFAULT NULL, `user_id` int(10) unsigned DEFAULT NULL,
`event_id` int(10) unsigned DEFAULT NULL, `event_id` int(10) unsigned DEFAULT NULL,
`is_deleted` tinyint(1) NOT NULL DEFAULT 0, `is_deleted` tinyint(1) NOT NULL DEFAULT 0,
`target_url` varchar(191) NOT NULL, `target_url` text NOT NULL,
`format` enum('JSON','UBL') NOT NULL DEFAULT 'JSON', `format` enum('JSON','UBL') NOT NULL DEFAULT 'JSON',
`created_at` timestamp(6) NULL DEFAULT NULL, `created_at` timestamp(6) NULL DEFAULT NULL,
`updated_at` timestamp(6) NULL DEFAULT NULL, `updated_at` timestamp(6) NULL DEFAULT NULL,
@ -2359,184 +2428,239 @@ CREATE TABLE `webhooks` (
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
INSERT INTO `migrations` VALUES (1,'2014_10_12_100000_create_password_resets_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_100000_create_password_resets_table',1);
INSERT INTO `migrations` VALUES (2,'2014_10_13_000000_create_users_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2014_10_13_000000_create_users_table',1);
INSERT INTO `migrations` VALUES (3,'2019_11_10_115926_create_failed_jobs_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2019_11_10_115926_create_failed_jobs_table',1);
INSERT INTO `migrations` VALUES (4,'2020_03_05_123315_create_jobs_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4,'2020_03_05_123315_create_jobs_table',1);
INSERT INTO `migrations` VALUES (5,'2020_04_08_234530_add_is_deleted_column_to_company_tokens_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2020_04_08_234530_add_is_deleted_column_to_company_tokens_table',1);
INSERT INTO `migrations` VALUES (6,'2020_05_13_035355_add_google_refresh_token_to_users_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2020_05_13_035355_add_google_refresh_token_to_users_table',1);
INSERT INTO `migrations` VALUES (7,'2020_07_05_084934_company_too_large_attribute',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2020_07_05_084934_company_too_large_attribute',1);
INSERT INTO `migrations` VALUES (8,'2020_07_08_065301_add_token_id_to_activity_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (8,'2020_07_08_065301_add_token_id_to_activity_table',1);
INSERT INTO `migrations` VALUES (9,'2020_07_21_112424_update_enabled_modules_value',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (9,'2020_07_21_112424_update_enabled_modules_value',1);
INSERT INTO `migrations` VALUES (10,'2020_07_28_104218_shop_token',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (10,'2020_07_28_104218_shop_token',1);
INSERT INTO `migrations` VALUES (11,'2020_08_04_080851_add_is_deleted_to_group_settings',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (11,'2020_08_04_080851_add_is_deleted_to_group_settings',1);
INSERT INTO `migrations` VALUES (12,'2020_08_11_221627_add_is_deleted_flag_to_client_gateway_token_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (12,'2020_08_11_221627_add_is_deleted_flag_to_client_gateway_token_table',1);
INSERT INTO `migrations` VALUES (13,'2020_08_13_095946_remove_photo_design',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (13,'2020_08_13_095946_remove_photo_design',1);
INSERT INTO `migrations` VALUES (14,'2020_08_13_212702_add_reminder_sent_fields_to_entity_tables',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2020_08_13_212702_add_reminder_sent_fields_to_entity_tables',1);
INSERT INTO `migrations` VALUES (15,'2020_08_18_140557_add_is_public_to_documents_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2020_08_18_140557_add_is_public_to_documents_table',1);
INSERT INTO `migrations` VALUES (16,'2020_09_22_205113_id_number_fields_for_missing_entities',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (16,'2020_09_22_205113_id_number_fields_for_missing_entities',1);
INSERT INTO `migrations` VALUES (17,'2020_09_27_215800_update_gateway_table_visible_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (17,'2020_09_27_215800_update_gateway_table_visible_column',1);
INSERT INTO `migrations` VALUES (18,'2020_10_11_211122_vendor_schema_update',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (18,'2020_10_11_211122_vendor_schema_update',1);
INSERT INTO `migrations` VALUES (19,'2020_10_12_204517_project_number_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (19,'2020_10_12_204517_project_number_column',1);
INSERT INTO `migrations` VALUES (20,'2020_10_14_201320_project_ids_to_entities',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2020_10_14_201320_project_ids_to_entities',1);
INSERT INTO `migrations` VALUES (21,'2020_10_19_101823_project_name_unique_removal',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2020_10_19_101823_project_name_unique_removal',1);
INSERT INTO `migrations` VALUES (22,'2020_10_21_222738_expenses_nullable_assigned_user',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2020_10_21_222738_expenses_nullable_assigned_user',1);
INSERT INTO `migrations` VALUES (23,'2020_10_22_204900_company_table_fields',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2020_10_22_204900_company_table_fields',1);
INSERT INTO `migrations` VALUES (24,'2020_10_27_021751_tasks_invoice_documents',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2020_10_27_021751_tasks_invoice_documents',1);
INSERT INTO `migrations` VALUES (25,'2020_10_28_224711_status_sort_order',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2020_10_28_224711_status_sort_order',1);
INSERT INTO `migrations` VALUES (26,'2020_10_28_225022_assigned_user_tasks_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2020_10_28_225022_assigned_user_tasks_table',1);
INSERT INTO `migrations` VALUES (27,'2020_10_29_001541_vendors_phone_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2020_10_29_001541_vendors_phone_column',1);
INSERT INTO `migrations` VALUES (28,'2020_10_29_093836_change_start_time_column_type',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2020_10_29_093836_change_start_time_column_type',1);
INSERT INTO `migrations` VALUES (29,'2020_10_29_204434_tasks_table_project_nullable',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29,'2020_10_29_204434_tasks_table_project_nullable',1);
INSERT INTO `migrations` VALUES (30,'2020_10_29_210402_change_default_show_tasks_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (30,'2020_10_29_210402_change_default_show_tasks_table',1);
INSERT INTO `migrations` VALUES (31,'2020_10_30_084139_change_expense_currency_id_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (31,'2020_10_30_084139_change_expense_currency_id_column',1);
INSERT INTO `migrations` VALUES (32,'2020_11_01_031750_drop_migrating_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (32,'2020_11_01_031750_drop_migrating_column',1);
INSERT INTO `migrations` VALUES (33,'2020_11_03_200345_company_gateway_fields_refactor',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (33,'2020_11_03_200345_company_gateway_fields_refactor',1);
INSERT INTO `migrations` VALUES (34,'2020_11_08_212050_custom_fields_for_payments_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (34,'2020_11_08_212050_custom_fields_for_payments_table',1);
INSERT INTO `migrations` VALUES (35,'2020_11_12_104413_company_gateway_rename_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (35,'2020_11_12_104413_company_gateway_rename_column',1);
INSERT INTO `migrations` VALUES (36,'2020_11_15_203755_soft_delete_paymentables',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (36,'2020_11_15_203755_soft_delete_paymentables',1);
INSERT INTO `migrations` VALUES (37,'2020_12_14_114722_task_fields',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (37,'2020_12_14_114722_task_fields',1);
INSERT INTO `migrations` VALUES (38,'2020_12_17_104033_add_enable_product_discount_field_to_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (38,'2020_12_17_104033_add_enable_product_discount_field_to_companies_table',1);
INSERT INTO `migrations` VALUES (39,'2020_12_20_005609_change_products_table_cost_resolution',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (39,'2020_12_20_005609_change_products_table_cost_resolution',1);
INSERT INTO `migrations` VALUES (40,'2020_12_23_220648_remove_null_values_in_countries_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (40,'2020_12_23_220648_remove_null_values_in_countries_table',1);
INSERT INTO `migrations` VALUES (41,'2021_01_03_215053_update_canadian_dollar_symbol',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (41,'2021_01_03_215053_update_canadian_dollar_symbol',1);
INSERT INTO `migrations` VALUES (42,'2021_01_05_013203_improve_decimal_resolution',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2021_01_05_013203_improve_decimal_resolution',1);
INSERT INTO `migrations` VALUES (43,'2021_01_07_023350_update_singapore_dollar_symbol',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (43,'2021_01_07_023350_update_singapore_dollar_symbol',1);
INSERT INTO `migrations` VALUES (44,'2021_01_08_093324_expenses_table_additional_fields',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (44,'2021_01_08_093324_expenses_table_additional_fields',1);
INSERT INTO `migrations` VALUES (45,'2021_01_11_092056_fix_company_settings_url',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (45,'2021_01_11_092056_fix_company_settings_url',1);
INSERT INTO `migrations` VALUES (46,'2021_01_17_040331_change_custom_surcharge_column_type',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (46,'2021_01_17_040331_change_custom_surcharge_column_type',1);
INSERT INTO `migrations` VALUES (47,'2021_01_23_044502_scheduler_is_running_check',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (47,'2021_01_23_044502_scheduler_is_running_check',1);
INSERT INTO `migrations` VALUES (48,'2021_01_24_052645_add_paid_to_date_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (48,'2021_01_24_052645_add_paid_to_date_column',1);
INSERT INTO `migrations` VALUES (49,'2021_01_25_095351_add_number_field_to_clients_and_vendors',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2021_01_25_095351_add_number_field_to_clients_and_vendors',1);
INSERT INTO `migrations` VALUES (50,'2021_01_29_121502_add_permission_changed_timestamp',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (50,'2021_01_29_121502_add_permission_changed_timestamp',1);
INSERT INTO `migrations` VALUES (51,'2021_02_15_214724_additional_company_properties',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (51,'2021_02_15_214724_additional_company_properties',1);
INSERT INTO `migrations` VALUES (52,'2021_02_19_212722_email_last_confirmed_email_address_users_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (52,'2021_02_19_212722_email_last_confirmed_email_address_users_table',1);
INSERT INTO `migrations` VALUES (53,'2021_02_25_205901_enum_invitations_email_status',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2021_02_25_205901_enum_invitations_email_status',1);
INSERT INTO `migrations` VALUES (54,'2021_02_27_091713_add_invoice_task_datelog_property',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2021_02_27_091713_add_invoice_task_datelog_property',1);
INSERT INTO `migrations` VALUES (55,'2021_03_03_230941_add_has_password_field_to_user_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2021_03_03_230941_add_has_password_field_to_user_table',1);
INSERT INTO `migrations` VALUES (56,'2021_03_08_123729_create_billing_subscriptions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2021_03_08_123729_create_billing_subscriptions_table',1);
INSERT INTO `migrations` VALUES (57,'2021_03_08_205030_add_russian_lang',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (57,'2021_03_08_205030_add_russian_lang',1);
INSERT INTO `migrations` VALUES (58,'2021_03_09_132242_add_currency_id_to_billing_subscriptions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (58,'2021_03_09_132242_add_currency_id_to_billing_subscriptions_table',1);
INSERT INTO `migrations` VALUES (59,'2021_03_18_113704_change_2fa_column_from_varchar_to_text',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2021_03_18_113704_change_2fa_column_from_varchar_to_text',1);
INSERT INTO `migrations` VALUES (60,'2021_03_19_221024_add_unique_constraints_on_all_entities',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (60,'2021_03_19_221024_add_unique_constraints_on_all_entities',1);
INSERT INTO `migrations` VALUES (61,'2021_03_20_033751_add_invoice_id_to_client_subscriptions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2021_03_20_033751_add_invoice_id_to_client_subscriptions_table',1);
INSERT INTO `migrations` VALUES (62,'2021_03_23_233844_add_nullable_constraint_to_recurring_invoice_id',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (62,'2021_03_23_233844_add_nullable_constraint_to_recurring_invoice_id',1);
INSERT INTO `migrations` VALUES (63,'2021_03_25_082025_refactor_billing_scriptions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (63,'2021_03_25_082025_refactor_billing_scriptions_table',1);
INSERT INTO `migrations` VALUES (64,'2021_03_26_201148_add_price_column_to_subscriptions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (64,'2021_03_26_201148_add_price_column_to_subscriptions_table',1);
INSERT INTO `migrations` VALUES (65,'2021_04_01_093128_modify_column_on_subscriptions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2021_04_01_093128_modify_column_on_subscriptions_table',1);
INSERT INTO `migrations` VALUES (66,'2021_04_05_115345_add_trial_duration_to_accounts_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (66,'2021_04_05_115345_add_trial_duration_to_accounts_table',1);
INSERT INTO `migrations` VALUES (67,'2021_04_05_213802_add_rest_fields_to_webhooks_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (67,'2021_04_05_213802_add_rest_fields_to_webhooks_table',1);
INSERT INTO `migrations` VALUES (68,'2021_04_06_131028_create_licenses_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (68,'2021_04_06_131028_create_licenses_table',1);
INSERT INTO `migrations` VALUES (69,'2021_04_12_095424_stripe_connect_gateway',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (69,'2021_04_12_095424_stripe_connect_gateway',1);
INSERT INTO `migrations` VALUES (70,'2021_04_13_013424_add_subscription_id_to_activities_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (70,'2021_04_13_013424_add_subscription_id_to_activities_table',1);
INSERT INTO `migrations` VALUES (71,'2021_04_22_110240_add_property_to_checkout_gateway_config',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (71,'2021_04_22_110240_add_property_to_checkout_gateway_config',1);
INSERT INTO `migrations` VALUES (72,'2021_04_29_085418_add_number_years_active_to_company_users_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (72,'2021_04_29_085418_add_number_years_active_to_company_users_table',1);
INSERT INTO `migrations` VALUES (73,'2021_05_03_152940_make_braintree_provider_visible',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (73,'2021_05_03_152940_make_braintree_provider_visible',1);
INSERT INTO `migrations` VALUES (74,'2021_05_04_231430_add_task_property_to_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (74,'2021_05_04_231430_add_task_property_to_companies_table',1);
INSERT INTO `migrations` VALUES (75,'2021_05_05_014713_activate_we_pay',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (75,'2021_05_05_014713_activate_we_pay',1);
INSERT INTO `migrations` VALUES (76,'2021_05_10_041528_add_recurring_invoice_id_to_activities_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (76,'2021_05_10_041528_add_recurring_invoice_id_to_activities_table',1);
INSERT INTO `migrations` VALUES (77,'2021_05_27_105157_add_tech_design',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (77,'2021_05_27_105157_add_tech_design',1);
INSERT INTO `migrations` VALUES (78,'2021_05_30_100933_make_documents_assigned_user_nullable',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (78,'2021_05_30_100933_make_documents_assigned_user_nullable',1);
INSERT INTO `migrations` VALUES (79,'2021_06_10_221012_add_ninja_portal_column_to_accounts_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (79,'2021_06_10_221012_add_ninja_portal_column_to_accounts_table',1);
INSERT INTO `migrations` VALUES (80,'2021_06_24_095942_payments_table_currency_nullable',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (80,'2021_06_24_095942_payments_table_currency_nullable',1);
INSERT INTO `migrations` VALUES (81,'2021_07_10_085821_activate_payfast_payment_driver',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (81,'2021_07_10_085821_activate_payfast_payment_driver',1);
INSERT INTO `migrations` VALUES (82,'2021_07_19_074503_set_invoice_task_datelog_true_in_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (82,'2021_07_19_074503_set_invoice_task_datelog_true_in_companies_table',1);
INSERT INTO `migrations` VALUES (83,'2021_07_20_095537_activate_paytrace_payment_driver',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (83,'2021_07_20_095537_activate_paytrace_payment_driver',1);
INSERT INTO `migrations` VALUES (84,'2021_07_21_213344_change_english_languages_tables',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (84,'2021_07_21_213344_change_english_languages_tables',1);
INSERT INTO `migrations` VALUES (85,'2021_07_21_234227_activate_eway_payment_driver',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (85,'2021_07_21_234227_activate_eway_payment_driver',1);
INSERT INTO `migrations` VALUES (86,'2021_08_03_115024_activate_mollie_payment_driver',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (86,'2021_08_03_115024_activate_mollie_payment_driver',1);
INSERT INTO `migrations` VALUES (87,'2021_08_05_235942_add_zelle_payment_type',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (87,'2021_08_05_235942_add_zelle_payment_type',1);
INSERT INTO `migrations` VALUES (88,'2021_08_07_222435_add_markdown_enabled_column_to_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (88,'2021_08_07_222435_add_markdown_enabled_column_to_companies_table',1);
INSERT INTO `migrations` VALUES (89,'2021_08_10_034407_add_more_languages',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (89,'2021_08_10_034407_add_more_languages',1);
INSERT INTO `migrations` VALUES (90,'2021_08_14_054458_square_payment_driver',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (90,'2021_08_14_054458_square_payment_driver',1);
INSERT INTO `migrations` VALUES (91,'2021_08_18_220124_use_comma_as_decimal_place_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (91,'2021_08_18_220124_use_comma_as_decimal_place_companies_table',1);
INSERT INTO `migrations` VALUES (92,'2021_08_23_101529_recurring_expenses_schema',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (92,'2021_08_23_101529_recurring_expenses_schema',1);
INSERT INTO `migrations` VALUES (93,'2021_08_25_093105_report_include_drafts_in_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (93,'2021_08_25_093105_report_include_drafts_in_companies_table',1);
INSERT INTO `migrations` VALUES (94,'2021_09_05_101209_update_braintree_gateway',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (94,'2021_09_05_101209_update_braintree_gateway',1);
INSERT INTO `migrations` VALUES (95,'2021_09_20_233053_set_square_test_mode_boolean',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (95,'2021_09_20_233053_set_square_test_mode_boolean',1);
INSERT INTO `migrations` VALUES (96,'2021_09_23_100629_add_currencies',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (96,'2021_09_23_100629_add_currencies',1);
INSERT INTO `migrations` VALUES (97,'2021_09_24_201319_add_mollie_bank_transfer_to_payment_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (97,'2021_09_24_201319_add_mollie_bank_transfer_to_payment_types',1);
INSERT INTO `migrations` VALUES (98,'2021_09_24_211504_add_kbc_to_payment_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (98,'2021_09_24_211504_add_kbc_to_payment_types',1);
INSERT INTO `migrations` VALUES (99,'2021_09_24_213858_add_bancontact_to_payment_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (99,'2021_09_24_213858_add_bancontact_to_payment_types',1);
INSERT INTO `migrations` VALUES (100,'2021_09_28_154647_activate_gocardless_payment_driver',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (100,'2021_09_28_154647_activate_gocardless_payment_driver',1);
INSERT INTO `migrations` VALUES (101,'2021_09_29_190258_add_required_client_registration_fields',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (101,'2021_09_29_190258_add_required_client_registration_fields',1);
INSERT INTO `migrations` VALUES (102,'2021_10_04_134908_add_ideal_to_payment_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (102,'2021_10_04_134908_add_ideal_to_payment_types',1);
INSERT INTO `migrations` VALUES (103,'2021_10_06_044800_updated_bold_and_modern_designs',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (103,'2021_10_06_044800_updated_bold_and_modern_designs',1);
INSERT INTO `migrations` VALUES (104,'2021_10_07_141737_razorpay',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (104,'2021_10_07_141737_razorpay',1);
INSERT INTO `migrations` VALUES (105,'2021_10_07_155410_add_hosted_page_to_payment_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (105,'2021_10_07_155410_add_hosted_page_to_payment_types',1);
INSERT INTO `migrations` VALUES (106,'2021_10_15_00000_stripe_payment_gateways',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (106,'2021_10_15_00000_stripe_payment_gateways',1);
INSERT INTO `migrations` VALUES (107,'2021_10_16_135200_add_direct_debit_to_payment_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (107,'2021_10_16_135200_add_direct_debit_to_payment_types',1);
INSERT INTO `migrations` VALUES (108,'2021_10_19_142200_add_gateway_type_for_direct_debit',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (108,'2021_10_19_142200_add_gateway_type_for_direct_debit',1);
INSERT INTO `migrations` VALUES (109,'2021_10_20_005529_add_filename_to_backups_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (109,'2021_10_20_005529_add_filename_to_backups_table',1);
INSERT INTO `migrations` VALUES (110,'2021_11_08_131308_onboarding',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (110,'2021_11_08_131308_onboarding',1);
INSERT INTO `migrations` VALUES (111,'2021_11_09_115919_update_designs',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (111,'2021_11_09_115919_update_designs',1);
INSERT INTO `migrations` VALUES (112,'2021_11_10_184847_add_is_migrate_column_to_accounts_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (112,'2021_11_10_184847_add_is_migrate_column_to_accounts_table',1);
INSERT INTO `migrations` VALUES (113,'2021_11_11_163121_add_instant_bank_transfer',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (113,'2021_11_11_163121_add_instant_bank_transfer',1);
INSERT INTO `migrations` VALUES (114,'2021_12_20_095542_add_serbian_language_translations',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (114,'2021_12_20_095542_add_serbian_language_translations',1);
INSERT INTO `migrations` VALUES (115,'2022_01_02_022421_add_slovak_language',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (115,'2022_01_02_022421_add_slovak_language',1);
INSERT INTO `migrations` VALUES (116,'2022_01_06_061231_add_app_domain_id_to_gateways_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (116,'2022_01_06_061231_add_app_domain_id_to_gateways_table',1);
INSERT INTO `migrations` VALUES (117,'2022_01_18_004856_add_estonian_language',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (117,'2022_01_18_004856_add_estonian_language',1);
INSERT INTO `migrations` VALUES (118,'2022_01_19_085907_add_platform_column_to_accounts_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (118,'2022_01_19_085907_add_platform_column_to_accounts_table',1);
INSERT INTO `migrations` VALUES (119,'2022_01_19_232436_add_kyd_currency',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (119,'2022_01_19_232436_add_kyd_currency',1);
INSERT INTO `migrations` VALUES (120,'2022_01_27_223617_add_client_count_to_accounts_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (120,'2022_01_27_223617_add_client_count_to_accounts_table',1);
INSERT INTO `migrations` VALUES (121,'2022_02_06_091629_add_client_currency_conversion_to_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (121,'2022_02_06_091629_add_client_currency_conversion_to_companies_table',1);
INSERT INTO `migrations` VALUES (122,'2022_02_25_015411_update_stripe_apple_domain_config',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (122,'2022_02_25_015411_update_stripe_apple_domain_config',1);
INSERT INTO `migrations` VALUES (123,'2022_03_09_053508_transaction_events',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (123,'2022_03_09_053508_transaction_events',1);
INSERT INTO `migrations` VALUES (124,'2022_03_24_090728_markdown_email_enabled_wysiwyg_editor',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (124,'2022_03_24_090728_markdown_email_enabled_wysiwyg_editor',1);
INSERT INTO `migrations` VALUES (125,'2022_03_29_014025_reverse_apple_domain_for_hosted',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (125,'2022_03_29_014025_reverse_apple_domain_for_hosted',1);
INSERT INTO `migrations` VALUES (126,'2022_04_14_121548_forte_payment_gateway',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (126,'2022_04_14_121548_forte_payment_gateway',1);
INSERT INTO `migrations` VALUES (127,'2022_04_22_115838_client_settings_parse_for_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (127,'2022_04_22_115838_client_settings_parse_for_types',1);
INSERT INTO `migrations` VALUES (128,'2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (128,'2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text',1);
INSERT INTO `migrations` VALUES (129,'2022_05_08_004937_heal_stripe_gateway_configuration',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (129,'2022_05_08_004937_heal_stripe_gateway_configuration',1);
INSERT INTO `migrations` VALUES (130,'2022_05_12_56879_add_stripe_klarna',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (130,'2022_05_12_56879_add_stripe_klarna',1);
INSERT INTO `migrations` VALUES (131,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (131,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',1);
INSERT INTO `migrations` VALUES (132,'2022_05_18_055442_update_custom_value_four_columns',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (132,'2022_05_18_055442_update_custom_value_four_columns',1);
INSERT INTO `migrations` VALUES (133,'2022_05_18_162152_create_scheduled_jobs_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (133,'2022_05_18_162152_create_scheduled_jobs_table',1);
INSERT INTO `migrations` VALUES (134,'2022_05_18_162443_create_schedulers_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (134,'2022_05_18_162443_create_schedulers_table',1);
INSERT INTO `migrations` VALUES (135,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (135,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',1);
INSERT INTO `migrations` VALUES (136,'2022_05_28_234651_create_purchase_orders_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (136,'2022_05_28_234651_create_purchase_orders_table',1);
INSERT INTO `migrations` VALUES (137,'2022_05_30_181109_drop_scheduled_jobs_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (137,'2022_05_30_181109_drop_scheduled_jobs_table',1);
INSERT INTO `migrations` VALUES (138,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (138,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',1);
INSERT INTO `migrations` VALUES (139,'2022_05_31_101504_inventory_management_schema',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (139,'2022_05_31_101504_inventory_management_schema',1);
INSERT INTO `migrations` VALUES (140,'2022_06_01_215859_set_recurring_client_timestamp',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (140,'2022_06_01_215859_set_recurring_client_timestamp',1);
INSERT INTO `migrations` VALUES (141,'2022_06_01_224339_create_purchase_order_invitations_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (141,'2022_06_01_224339_create_purchase_order_invitations_table',1);
INSERT INTO `migrations` VALUES (142,'2022_06_10_030503_set_account_flag_for_react',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (142,'2022_06_10_030503_set_account_flag_for_react',1);
INSERT INTO `migrations` VALUES (143,'2022_06_16_025156_add_react_switching_flag',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (143,'2022_06_16_025156_add_react_switching_flag',1);
INSERT INTO `migrations` VALUES (144,'2022_06_17_082627_change_refresh_token_column_size',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (144,'2022_06_17_082627_change_refresh_token_column_size',1);
INSERT INTO `migrations` VALUES (145,'2022_06_21_104350_fixes_for_description_in_pdf_designs',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (145,'2022_06_21_104350_fixes_for_description_in_pdf_designs',1);
INSERT INTO `migrations` VALUES (146,'2022_06_22_090547_set_oauth_expiry_column',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (146,'2022_06_22_090547_set_oauth_expiry_column',1);
INSERT INTO `migrations` VALUES (147,'2022_06_24_141018_upgrade_failed_jobs_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (147,'2022_06_24_141018_upgrade_failed_jobs_table',1);
INSERT INTO `migrations` VALUES (148,'2022_06_30_000126_add_flag_to_accounts_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (148,'2022_06_30_000126_add_flag_to_accounts_table',1);
INSERT INTO `migrations` VALUES (149,'2022_07_06_080127_add_purchase_order_to_expense',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (149,'2022_07_06_080127_add_purchase_order_to_expense',1);
INSERT INTO `migrations` VALUES (150,'2022_07_09_235510_add_index_to_payment_hash',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (150,'2022_07_09_235510_add_index_to_payment_hash',1);
INSERT INTO `migrations` VALUES (151,'2022_07_12_45766_add_matomo',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (151,'2022_07_12_45766_add_matomo',1);
INSERT INTO `migrations` VALUES (152,'2022_07_18_033756_fixes_for_date_formats_table_react',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (152,'2022_07_18_033756_fixes_for_date_formats_table_react',1);
INSERT INTO `migrations` VALUES (153,'2022_07_21_023805_add_hebrew_language',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (153,'2022_07_21_023805_add_hebrew_language',1);
INSERT INTO `migrations` VALUES (154,'2022_07_26_091216_add_sms_verification_to_hosted_account',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (154,'2022_07_26_091216_add_sms_verification_to_hosted_account',1);
INSERT INTO `migrations` VALUES (155,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (155,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',1);
INSERT INTO `migrations` VALUES (156,'2022_07_29_091235_correction_for_companies_table_types',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (156,'2022_07_29_091235_correction_for_companies_table_types',1);
INSERT INTO `migrations` VALUES (157,'2022_08_05_023357_bank_integration',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (157,'2022_08_05_023357_bank_integration',1);
INSERT INTO `migrations` VALUES (158,'2022_08_11_011534_licenses_table_for_self_host',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (158,'2022_08_11_011534_licenses_table_for_self_host',1);
INSERT INTO `migrations` VALUES (159,'2022_08_24_215917_invoice_task_project_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (159,'2022_08_24_215917_invoice_task_project_companies_table',1);
INSERT INTO `migrations` VALUES (160,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (160,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',1);
INSERT INTO `migrations` VALUES (161,'2022_08_28_210111_add_index_to_payments_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (161,'2022_08_28_210111_add_index_to_payments_table',1);
INSERT INTO `migrations` VALUES (162,'2022_09_05_024719_update_designs_for_tech_template',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (162,'2022_09_05_024719_update_designs_for_tech_template',1);
INSERT INTO `migrations` VALUES (163,'2022_09_07_101731_add_reporting_option_to_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (163,'2022_09_07_101731_add_reporting_option_to_companies_table',1);
INSERT INTO `migrations` VALUES (164,'2022_09_21_012417_add_threeds_to_braintree',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (164,'2022_09_21_012417_add_threeds_to_braintree',1);
INSERT INTO `migrations` VALUES (165,'2022_09_30_235337_add_idempotency_key_to_payments',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (165,'2022_09_30_235337_add_idempotency_key_to_payments',1);
INSERT INTO `migrations` VALUES (166,'2022_10_05_205645_add_indexes_to_client_hash',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (166,'2022_10_05_205645_add_indexes_to_client_hash',1);
INSERT INTO `migrations` VALUES (167,'2022_10_06_011344_add_key_to_products',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (167,'2022_10_06_011344_add_key_to_products',1);
INSERT INTO `migrations` VALUES (168,'2022_10_07_065455_add_key_to_company_tokens_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (168,'2022_10_07_065455_add_key_to_company_tokens_table',1);
INSERT INTO `migrations` VALUES (169,'2022_10_10_070137_add_documentable_index',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (169,'2022_10_10_070137_add_documentable_index',1);
INSERT INTO `migrations` VALUES (170,'2022_10_27_044909_add_user_sms_verification_code',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (170,'2022_10_27_044909_add_user_sms_verification_code',1);
INSERT INTO `migrations` VALUES (171,'2022_11_02_063742_add_verified_number_flag_to_users_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (171,'2022_11_02_063742_add_verified_number_flag_to_users_table',1);
INSERT INTO `migrations` VALUES (172,'2022_11_04_013539_disabled_upstream_bank_integrations_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (172,'2022_11_04_013539_disabled_upstream_bank_integrations_table',1);
INSERT INTO `migrations` VALUES (173,'2022_11_06_215526_drop_html_backups_column_from_backups_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (173,'2022_11_06_215526_drop_html_backups_column_from_backups_table',1);
INSERT INTO `migrations` VALUES (174,'2022_11_13_034143_bank_transaction_rules_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (174,'2022_11_13_034143_bank_transaction_rules_table',1);
INSERT INTO `migrations` VALUES (175,'2022_11_16_093535_calmness_design',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (175,'2022_11_16_093535_calmness_design',1);
INSERT INTO `migrations` VALUES (176,'2022_11_22_215618_lock_tasks_when_invoiced',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (176,'2022_11_22_215618_lock_tasks_when_invoiced',1);
INSERT INTO `migrations` VALUES (177,'2022_11_30_063229_add_payment_id_to_bank_transaction_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (177,'2022_11_30_063229_add_payment_id_to_bank_transaction_table',1);
INSERT INTO `migrations` VALUES (178,'2022_12_07_024625_add_properties_to_companies_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (178,'2022_12_07_024625_add_properties_to_companies_table',1);
INSERT INTO `migrations` VALUES (179,'2022_12_14_004639_vendor_currency_update',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (179,'2022_12_14_004639_vendor_currency_update',1);
INSERT INTO `migrations` VALUES (180,'2022_12_20_063038_set_proforma_invoice_type',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (180,'2022_12_20_063038_set_proforma_invoice_type',1);
INSERT INTO `migrations` VALUES (181,'2023_01_12_125540_set_auto_bill_on_regular_invoice_setting',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (181,'2023_01_12_125540_set_auto_bill_on_regular_invoice_setting',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (182,'2022_16_12_54687_add_stripe_bacs',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (183,'2023_01_27_023127_update_design_templates',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (184,'2023_02_02_062938_add_additional_required_fields_gateways',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (185,'2023_02_05_042351_add_foreign_key_for_vendors',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (186,'2023_02_07_114011_add_additional_product_fields',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (187,'2023_02_14_064135_create_react_settings_column_company_user_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (188,'2023_02_28_064453_update_designs',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (189,'2023_02_28_200056_add_visible_prop_to_companies_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (190,'2023_03_09_121033_add_payment_balance_to_clients_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (191,'2023_03_10_100629_add_currencies',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (192,'2023_03_13_156872_add_e_invoice_type_to_clients_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (193,'2023_03_17_012309_add_proforma_flag_for_recurring_invoices',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (194,'2023_03_21_053933_tax_calculations_for_invoices',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (195,'2023_03_24_054758_add_client_is_exempt_from_taxes',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (196,'2023_04_20_215159_drop_e_invoice_type_column',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (197,'2023_04_27_045639_add_kmher_language',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (198,'2023_05_03_023956_add_shopify_user_id',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (199,'2023_05_15_103212_e_invoice_ssl_storage',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (200,'2023_06_04_064713_project_and_task_columns_for_company_model',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (201,'2023_06_13_220252_add_hungarian_translations',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (202,'2023_06_20_123355_add_paypal_rest_payment_driver',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (203,'2023_07_06_063512_update_designs',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (204,'2023_07_08_000314_add_french_swiss_translations',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (205,'2023_07_12_074829_add_thai_baht_currency_symbol',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (206,'2023_07_18_214607_add_start_date_column_to_tasks',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (207,'2023_07_22_234329_change_currency_format_for_indonesian_rupiah',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (208,'2023_08_06_070205_create_view_dashboard_permission_migration',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (209,'2023_08_08_212710_add_signature_ip_address_to_purchase_order_invitations',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (210,'2023_08_09_224955_add_nicaragua_currency',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (211,'2023_09_11_003230_add_client_and_company_classifications',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (212,'2023_09_21_042010_add_template_flag_to_designs_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (213,'2023_10_01_102220_add_language_id_to_users_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (214,'2023_10_08_092508_add_refund_meta_and_category_to_payments_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (215,'2023_10_10_083024_add_ariary_currency',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (216,'2023_10_15_204204_add_paypal_ppcp',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (217,'2023_10_18_061415_add_user_notification_suppression',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (218,'2023_11_26_082959_add_bank_integration_id',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (219,'2023_11_27_095042_add_hash_and_meta_columns_to_tasks_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (220,'2023_11_30_042431_2023_11_30_add_payment_visibility',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (221,'2024_01_09_084515_product_cost_field_population',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (222,'2024_01_10_071427_normalize_product_cost_types',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (223,'2024_01_10_155555_add_bank_transaction_nordigen_field',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (224,'2024_01_12_073629_laos_currency_translation',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (225,'2024_01_29_080555_2024_01_29_update_timezones_naming',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (226,'2024_02_06_204031_correction_for_krw_currency',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (227,'2024_02_16_011055_smtp_configuration',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (228,'2024_02_28_180250_add_steps_to_subscriptions',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (229,'2024_03_07_195116_add_tax_data_to_quotes',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (230,'2024_03_14_201844_adjust_discount_column_max_resolution',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (231,'2024_03_24_200109_new_currencies_03_24',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (232,'2024_04_24_064301_optional_display_required_fields_payment_gateways',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (233,'2024_05_02_030103_2024_05_02_update_timezones',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (234,'2024_05_03_145535_btcpay_gateway',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (235,'2024_05_19_215103_2024_05_20_einvoice_columns',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (236,'2024_05_26_210407_2024_05_28_kwd_precision',2);

View File

@ -54,7 +54,7 @@ class CheckRemindersTest extends TestCase
$this->invoice->service()->markSent(); $this->invoice->service()->markSent();
$this->invoice->service()->setReminder($settings)->save(); $this->invoice->service()->setReminder($settings)->save();
$this->assertEquals(0, Carbon::now()->addDays(7)->diffInDays($this->invoice->next_send_date)); $this->assertEquals(0, intval(abs(Carbon::now()->addDays(7)->diffInDays($this->invoice->next_send_date))));
} }
public function test_no_reminders_sent_to_paid_invoices() public function test_no_reminders_sent_to_paid_invoices()
@ -100,7 +100,7 @@ class CheckRemindersTest extends TestCase
$this->invoice->service()->markSent(); $this->invoice->service()->markSent();
$this->invoice->service()->setReminder($settings)->save(); $this->invoice->service()->setReminder($settings)->save();
$this->assertEquals(0, Carbon::parse($this->invoice->due_date)->subDays(29)->diffInDays($this->invoice->next_send_date)); $this->assertEquals(0, intval(abs(Carbon::parse($this->invoice->due_date)->subDays(29)->diffInDays($this->invoice->next_send_date))));
} }
public function test_after_due_date_reminder() public function test_after_due_date_reminder()
@ -120,7 +120,7 @@ class CheckRemindersTest extends TestCase
$this->invoice->service()->markSent(); $this->invoice->service()->markSent();
$this->invoice->service()->setReminder($settings)->save(); $this->invoice->service()->setReminder($settings)->save();
$this->assertEquals(0, Carbon::parse($this->invoice->due_date)->addDays(1)->diffInDays($this->invoice->next_send_date)); $this->assertEquals(0, intval(abs(Carbon::parse($this->invoice->due_date)->addDays(1)->diffInDays($this->invoice->next_send_date))));
} }
public function test_turning_off_reminders() public function test_turning_off_reminders()

View File

@ -209,7 +209,7 @@ class DatesTest extends TestCase
$start_date = Carbon::parse($string_date); $start_date = Carbon::parse($string_date);
$current_date = Carbon::parse('2021-06-20'); $current_date = Carbon::parse('2021-06-20');
$diff_in_days = $start_date->diffInDays($current_date); $diff_in_days = intval(abs($start_date->diffInDays($current_date)));
$this->assertEquals(19, $diff_in_days); $this->assertEquals(19, $diff_in_days);
} }
@ -218,9 +218,9 @@ class DatesTest extends TestCase
{ {
$now = Carbon::parse('2020-01-01'); $now = Carbon::parse('2020-01-01');
$x = now()->diffInDays(now()->addDays(7)); $x = intval(abs(now()->diffInDays(now()->addDays(7))));
$this->assertEquals(7, $x); $this->assertEquals(7, intval(abs($x)));
} }
public function testFourteenDaysFromNow() public function testFourteenDaysFromNow()

View File

@ -25,29 +25,8 @@ class RefundUnitTest extends TestCase
{ {
parent::setUp(); parent::setUp();
} }
// public function testProRataRefundMonthly()
// {
// $pro_rata = new ProRata();
// $refund = $pro_rata->refund(10, Carbon::parse('2021-01-01'), Carbon::parse('2021-01-31'), RecurringInvoice::FREQUENCY_MONTHLY);
// $this->assertEquals(9.68, $refund);
// $this->assertEquals(30, Carbon::parse('2021-01-01')->diffInDays(Carbon::parse('2021-01-31')));
// }
// public function testProRataRefundYearly()
// {
// $pro_rata = new ProRata();
// $refund = $pro_rata->refund(10, Carbon::parse('2021-01-01'), Carbon::parse('2021-01-31'), RecurringInvoice::FREQUENCY_ANNUALLY);
// $this->assertEquals(0.82, $refund);
// }
public function testDiffInDays() public function testDiffInDays()
{ {
$this->assertEquals(30, Carbon::parse('2021-01-01')->diffInDays(Carbon::parse('2021-01-31'))); $this->assertEquals(30, intval(abs(Carbon::parse('2021-01-01')->diffInDays(Carbon::parse('2021-01-31')))));
} }
} }