Fixes for calculate taxes - edge case with Recurring Invoice

This commit is contained in:
David Bomba 2024-08-20 11:53:10 +10:00
parent 609d464ac7
commit 0615ba25ed
5 changed files with 205 additions and 210 deletions

View File

@ -17,6 +17,7 @@ use App\Models\Invoice;
use App\Models\Product; use App\Models\Product;
use App\DataProviders\USStates; use App\DataProviders\USStates;
use App\DataMapper\Tax\ZipTax\Response; use App\DataMapper\Tax\ZipTax\Response;
use App\Models\RecurringInvoice;
class BaseRule implements RuleInterface class BaseRule implements RuleInterface
{ {
@ -403,6 +404,9 @@ class BaseRule implements RuleInterface
{ {
$lock_invoices = $this->client->getSetting('lock_invoices'); $lock_invoices = $this->client->getSetting('lock_invoices');
if($this->invoice instanceof RecurringInvoice)
return true;
switch ($lock_invoices) { switch ($lock_invoices) {
case 'off': case 'off':
return true; return true;

View File

@ -130,8 +130,7 @@
"app/Helpers/Generic.php", "app/Helpers/Generic.php",
"app/Helpers/ClientPortal.php" "app/Helpers/ClientPortal.php"
], ],
"classmap": [ "classmap": []
]
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
@ -202,4 +201,4 @@
], ],
"minimum-stability": "dev", "minimum-stability": "dev",
"prefer-stable": true "prefer-stable": true
} }

395
composer.lock generated
View File

@ -535,16 +535,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.319.0", "version": "3.320.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "a5c408d4cd1945d5fc817f45e46383634b610497" "reference": "653549ab0e274747a46a96fd375df642704f21e2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a5c408d4cd1945d5fc817f45e46383634b610497", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/653549ab0e274747a46a96fd375df642704f21e2",
"reference": "a5c408d4cd1945d5fc817f45e46383634b610497", "reference": "653549ab0e274747a46a96fd375df642704f21e2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -627,9 +627,9 @@
"support": { "support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.319.0" "source": "https://github.com/aws/aws-sdk-php/tree/3.320.1"
}, },
"time": "2024-08-07T18:05:51+00:00" "time": "2024-08-15T18:07:13+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -1119,23 +1119,23 @@
}, },
{ {
"name": "dasprid/enum", "name": "dasprid/enum",
"version": "1.0.5", "version": "1.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/DASPRiD/Enum.git", "url": "https://github.com/DASPRiD/Enum.git",
"reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016" "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6faf451159fb8ba4126b925ed2d78acfce0dc016", "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8dfd07c6d2cf31c8da90c53b83c026c7696dda90",
"reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016", "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1 <9.0" "php": ">=7.1 <9.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^7 | ^8 | ^9", "phpunit/phpunit": "^7 || ^8 || ^9 || ^10 || ^11",
"squizlabs/php_codesniffer": "*" "squizlabs/php_codesniffer": "*"
}, },
"type": "library", "type": "library",
@ -1163,9 +1163,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/DASPRiD/Enum/issues", "issues": "https://github.com/DASPRiD/Enum/issues",
"source": "https://github.com/DASPRiD/Enum/tree/1.0.5" "source": "https://github.com/DASPRiD/Enum/tree/1.0.6"
}, },
"time": "2023-08-25T16:18:39+00:00" "time": "2024-08-09T14:30:48+00:00"
}, },
{ {
"name": "dflydev/apache-mime-types", "name": "dflydev/apache-mime-types",
@ -1303,16 +1303,16 @@
}, },
{ {
"name": "doctrine/dbal", "name": "doctrine/dbal",
"version": "4.0.4", "version": "4.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/dbal.git", "url": "https://github.com/doctrine/dbal.git",
"reference": "50fda19f80724b55ff770bb4ff352407008e63c5" "reference": "2377cd41609aa51bee822c8d207317a3f363a558"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/50fda19f80724b55ff770bb4ff352407008e63c5", "url": "https://api.github.com/repos/doctrine/dbal/zipball/2377cd41609aa51bee822c8d207317a3f363a558",
"reference": "50fda19f80724b55ff770bb4ff352407008e63c5", "reference": "2377cd41609aa51bee822c8d207317a3f363a558",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1325,13 +1325,13 @@
"doctrine/coding-standard": "12.0.0", "doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1", "fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2023.2", "jetbrains/phpstorm-stubs": "2023.2",
"phpstan/phpstan": "1.11.5", "phpstan/phpstan": "1.11.7",
"phpstan/phpstan-phpunit": "1.4.0", "phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan-strict-rules": "^1.6", "phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpunit": "10.5.22", "phpunit/phpunit": "10.5.28",
"psalm/plugin-phpunit": "0.19.0", "psalm/plugin-phpunit": "0.19.0",
"slevomat/coding-standard": "8.13.1", "slevomat/coding-standard": "8.13.1",
"squizlabs/php_codesniffer": "3.10.1", "squizlabs/php_codesniffer": "3.10.2",
"symfony/cache": "^6.3.8|^7.0", "symfony/cache": "^6.3.8|^7.0",
"symfony/console": "^5.4|^6.3|^7.0", "symfony/console": "^5.4|^6.3|^7.0",
"vimeo/psalm": "5.24.0" "vimeo/psalm": "5.24.0"
@ -1391,7 +1391,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/dbal/issues", "issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/4.0.4" "source": "https://github.com/doctrine/dbal/tree/4.1.0"
}, },
"funding": [ "funding": [
{ {
@ -1407,7 +1407,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-06-19T11:57:23+00:00" "time": "2024-08-15T07:37:07+00:00"
}, },
{ {
"name": "doctrine/deprecations", "name": "doctrine/deprecations",
@ -2522,7 +2522,7 @@
}, },
{ {
"name": "google/apiclient-services", "name": "google/apiclient-services",
"version": "v0.367.0", "version": "v0.368.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git", "url": "https://github.com/googleapis/google-api-php-client-services.git",
@ -2560,7 +2560,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues", "issues": "https://github.com/googleapis/google-api-php-client-services/issues",
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.367.0" "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.368.0"
}, },
"time": "2024-07-11T01:08:44+00:00" "time": "2024-07-11T01:08:44+00:00"
}, },
@ -4489,16 +4489,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v11.19.0", "version": "v11.20.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "5e103d499e9ee5bcfc184412d034c4e516b87085" "reference": "3cd7593dd9b67002fc416b46616f4d4d1da3e571"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/5e103d499e9ee5bcfc184412d034c4e516b87085", "url": "https://api.github.com/repos/laravel/framework/zipball/3cd7593dd9b67002fc416b46616f4d4d1da3e571",
"reference": "5e103d499e9ee5bcfc184412d034c4e516b87085", "reference": "3cd7593dd9b67002fc416b46616f4d4d1da3e571",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4691,20 +4691,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-07-30T15:22:41+00:00" "time": "2024-08-06T14:39:21+00:00"
}, },
{ {
"name": "laravel/pint", "name": "laravel/pint",
"version": "v1.17.1", "version": "v1.17.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/pint.git", "url": "https://github.com/laravel/pint.git",
"reference": "b5b6f716db298671c1dfea5b1082ec2c0ae7064f" "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/b5b6f716db298671c1dfea5b1082ec2c0ae7064f", "url": "https://api.github.com/repos/laravel/pint/zipball/e8a88130a25e3f9d4d5785e6a1afca98268ab110",
"reference": "b5b6f716db298671c1dfea5b1082ec2c0ae7064f", "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4715,13 +4715,13 @@
"php": "^8.1.0" "php": "^8.1.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^3.59.3", "friendsofphp/php-cs-fixer": "^3.61.1",
"illuminate/view": "^10.48.12", "illuminate/view": "^10.48.18",
"larastan/larastan": "^2.9.7", "larastan/larastan": "^2.9.8",
"laravel-zero/framework": "^10.4.0", "laravel-zero/framework": "^10.4.0",
"mockery/mockery": "^1.6.12", "mockery/mockery": "^1.6.12",
"nunomaduro/termwind": "^1.15.1", "nunomaduro/termwind": "^1.15.1",
"pestphp/pest": "^2.34.8" "pestphp/pest": "^2.35.0"
}, },
"bin": [ "bin": [
"builds/pint" "builds/pint"
@ -4757,7 +4757,7 @@
"issues": "https://github.com/laravel/pint/issues", "issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint" "source": "https://github.com/laravel/pint"
}, },
"time": "2024-08-01T09:06:33+00:00" "time": "2024-08-06T15:11:54+00:00"
}, },
{ {
"name": "laravel/prompts", "name": "laravel/prompts",
@ -4819,26 +4819,27 @@
}, },
{ {
"name": "laravel/serializable-closure", "name": "laravel/serializable-closure",
"version": "v1.3.3", "version": "v1.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/serializable-closure.git", "url": "https://github.com/laravel/serializable-closure.git",
"reference": "3dbf8a8e914634c48d389c1234552666b3d43754" "reference": "61b87392d986dc49ad5ef64e75b1ff5fee24ef81"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/61b87392d986dc49ad5ef64e75b1ff5fee24ef81",
"reference": "3dbf8a8e914634c48d389c1234552666b3d43754", "reference": "61b87392d986dc49ad5ef64e75b1ff5fee24ef81",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.3|^8.0" "php": "^7.3|^8.0"
}, },
"require-dev": { "require-dev": {
"nesbot/carbon": "^2.61", "illuminate/support": "^8.0|^9.0|^10.0|^11.0",
"nesbot/carbon": "^2.61|^3.0",
"pestphp/pest": "^1.21.3", "pestphp/pest": "^1.21.3",
"phpstan/phpstan": "^1.8.2", "phpstan/phpstan": "^1.8.2",
"symfony/var-dumper": "^5.4.11" "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -4875,7 +4876,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues", "issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure" "source": "https://github.com/laravel/serializable-closure"
}, },
"time": "2023-11-08T14:08:06+00:00" "time": "2024-08-02T07:48:17+00:00"
}, },
{ {
"name": "laravel/slack-notification-channel", "name": "laravel/slack-notification-channel",
@ -5282,16 +5283,16 @@
}, },
{ {
"name": "league/commonmark", "name": "league/commonmark",
"version": "2.5.1", "version": "2.5.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/commonmark.git", "url": "https://github.com/thephpleague/commonmark.git",
"reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c" "reference": "df09d5b6a4188f8f3c3ab2e43a109076a5eeb767"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/ac815920de0eff6de947eac0a6a94e5ed0fb147c", "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/df09d5b6a4188f8f3c3ab2e43a109076a5eeb767",
"reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c", "reference": "df09d5b6a4188f8f3c3ab2e43a109076a5eeb767",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5384,7 +5385,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-24T12:52:09+00:00" "time": "2024-08-14T10:56:57+00:00"
}, },
{ {
"name": "league/config", "name": "league/config",
@ -7063,20 +7064,20 @@
}, },
{ {
"name": "nette/utils", "name": "nette/utils",
"version": "v4.0.4", "version": "v4.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nette/utils.git", "url": "https://github.com/nette/utils.git",
"reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96",
"reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.0 <8.4" "php": "8.0 - 8.4"
}, },
"conflict": { "conflict": {
"nette/finder": "<3", "nette/finder": "<3",
@ -7143,9 +7144,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nette/utils/issues", "issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v4.0.4" "source": "https://github.com/nette/utils/tree/v4.0.5"
}, },
"time": "2024-01-17T16:50:36+00:00" "time": "2024-08-07T15:39:19+00:00"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
@ -8219,16 +8220,16 @@
}, },
{ {
"name": "phpseclib/phpseclib", "name": "phpseclib/phpseclib",
"version": "3.0.39", "version": "3.0.41",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpseclib/phpseclib.git", "url": "https://github.com/phpseclib/phpseclib.git",
"reference": "211ebc399c6e73c225a018435fe5ae209d1d1485" "reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/211ebc399c6e73c225a018435fe5ae209d1d1485", "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/621c73f7dcb310b61de34d1da4c4204e8ace6ceb",
"reference": "211ebc399c6e73c225a018435fe5ae209d1d1485", "reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -8309,7 +8310,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/phpseclib/phpseclib/issues", "issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.39" "source": "https://github.com/phpseclib/phpseclib/tree/3.0.41"
}, },
"funding": [ "funding": [
{ {
@ -8325,7 +8326,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-06-24T06:27:33+00:00" "time": "2024-08-12T00:13:54+00:00"
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
@ -9661,16 +9662,16 @@
}, },
{ {
"name": "sentry/sentry", "name": "sentry/sentry",
"version": "4.8.1", "version": "4.9.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getsentry/sentry-php.git", "url": "https://github.com/getsentry/sentry-php.git",
"reference": "61770efd8b7888e0bdd7d234f0ba67b066e47d04" "reference": "788ec170f51ebb22f2809a1e3f78b19ccd39b70d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/61770efd8b7888e0bdd7d234f0ba67b066e47d04", "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/788ec170f51ebb22f2809a1e3f78b19ccd39b70d",
"reference": "61770efd8b7888e0bdd7d234f0ba67b066e47d04", "reference": "788ec170f51ebb22f2809a1e3f78b19ccd39b70d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -9734,7 +9735,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/getsentry/sentry-php/issues", "issues": "https://github.com/getsentry/sentry-php/issues",
"source": "https://github.com/getsentry/sentry-php/tree/4.8.1" "source": "https://github.com/getsentry/sentry-php/tree/4.9.0"
}, },
"funding": [ "funding": [
{ {
@ -9746,27 +9747,27 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2024-07-16T13:45:27+00:00" "time": "2024-08-08T14:40:50+00:00"
}, },
{ {
"name": "sentry/sentry-laravel", "name": "sentry/sentry-laravel",
"version": "4.7.1", "version": "4.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getsentry/sentry-laravel.git", "url": "https://github.com/getsentry/sentry-laravel.git",
"reference": "d70415f19f35806acee5bcbc7403e9cb8fb5252c" "reference": "2bbcb7e81097993cf64d5b296eaa6d396cddd5a7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/d70415f19f35806acee5bcbc7403e9cb8fb5252c", "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/2bbcb7e81097993cf64d5b296eaa6d396cddd5a7",
"reference": "d70415f19f35806acee5bcbc7403e9cb8fb5252c", "reference": "2bbcb7e81097993cf64d5b296eaa6d396cddd5a7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0", "illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0",
"nyholm/psr7": "^1.0", "nyholm/psr7": "^1.0",
"php": "^7.2 | ^8.0", "php": "^7.2 | ^8.0",
"sentry/sentry": "^4.7", "sentry/sentry": "^4.9",
"symfony/psr-http-message-bridge": "^1.0 | ^2.0 | ^6.0 | ^7.0" "symfony/psr-http-message-bridge": "^1.0 | ^2.0 | ^6.0 | ^7.0"
}, },
"require-dev": { "require-dev": {
@ -9823,7 +9824,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/getsentry/sentry-laravel/issues", "issues": "https://github.com/getsentry/sentry-laravel/issues",
"source": "https://github.com/getsentry/sentry-laravel/tree/4.7.1" "source": "https://github.com/getsentry/sentry-laravel/tree/4.8.0"
}, },
"funding": [ "funding": [
{ {
@ -9835,7 +9836,7 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2024-07-17T13:27:43+00:00" "time": "2024-08-15T19:03:01+00:00"
}, },
{ {
"name": "setasign/fpdf", "name": "setasign/fpdf",
@ -12505,6 +12506,82 @@
], ],
"time": "2024-05-31T15:07:36+00:00" "time": "2024-05-31T15:07:36+00:00"
}, },
{
"name": "symfony/polyfill-php81",
"version": "v1.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af",
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-06-19T12:30:46+00:00"
},
{ {
"name": "symfony/polyfill-php83", "name": "symfony/polyfill-php83",
"version": "v1.30.0", "version": "v1.30.0",
@ -14079,16 +14156,16 @@
}, },
{ {
"name": "twig/intl-extra", "name": "twig/intl-extra",
"version": "v3.10.0", "version": "v3.11.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/intl-extra.git", "url": "https://github.com/twigphp/intl-extra.git",
"reference": "693f6beb8ca91fc6323e01b3addf983812f65c93" "reference": "e9cadd61342e71e45b2f4f0558122433fd7e4566"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/intl-extra/zipball/693f6beb8ca91fc6323e01b3addf983812f65c93", "url": "https://api.github.com/repos/twigphp/intl-extra/zipball/e9cadd61342e71e45b2f4f0558122433fd7e4566",
"reference": "693f6beb8ca91fc6323e01b3addf983812f65c93", "reference": "e9cadd61342e71e45b2f4f0558122433fd7e4566",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -14127,7 +14204,7 @@
"twig" "twig"
], ],
"support": { "support": {
"source": "https://github.com/twigphp/intl-extra/tree/v3.10.0" "source": "https://github.com/twigphp/intl-extra/tree/v3.11.0"
}, },
"funding": [ "funding": [
{ {
@ -14139,20 +14216,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-05-11T07:35:57+00:00" "time": "2024-06-21T06:25:01+00:00"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.10.3", "version": "v3.11.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "67f29781ffafa520b0bbfbd8384674b42db04572" "reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/67f29781ffafa520b0bbfbd8384674b42db04572", "url": "https://api.github.com/repos/twigphp/Twig/zipball/e80fb8ebba85c7341a97a9ebf825d7fd4b77708d",
"reference": "67f29781ffafa520b0bbfbd8384674b42db04572", "reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -14160,7 +14237,8 @@
"symfony/deprecation-contracts": "^2.5|^3", "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-ctype": "^1.8", "symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3", "symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php80": "^1.22" "symfony/polyfill-php80": "^1.22",
"symfony/polyfill-php81": "^1.29"
}, },
"require-dev": { "require-dev": {
"psr/container": "^1.0|^2.0", "psr/container": "^1.0|^2.0",
@ -14206,7 +14284,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.10.3" "source": "https://github.com/twigphp/Twig/tree/v3.11.0"
}, },
"funding": [ "funding": [
{ {
@ -14218,7 +14296,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-05-16T10:04:27+00:00" "time": "2024-08-08T16:15:16+00:00"
}, },
{ {
"name": "twilio/sdk", "name": "twilio/sdk",
@ -15453,16 +15531,16 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.61.1", "version": "v3.62.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "94a87189f55814e6cabca2d9a33b06de384a2ab8" "reference": "627692f794d35c43483f34b01d94740df2a73507"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/94a87189f55814e6cabca2d9a33b06de384a2ab8", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/627692f794d35c43483f34b01d94740df2a73507",
"reference": "94a87189f55814e6cabca2d9a33b06de384a2ab8", "reference": "627692f794d35c43483f34b01d94740df2a73507",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -15544,7 +15622,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.61.1" "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.62.0"
}, },
"funding": [ "funding": [
{ {
@ -15552,7 +15630,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-07-31T14:33:15+00:00" "time": "2024-08-07T17:03:09+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@ -16134,16 +16212,16 @@
}, },
{ {
"name": "phpmyadmin/sql-parser", "name": "phpmyadmin/sql-parser",
"version": "5.9.0", "version": "5.9.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpmyadmin/sql-parser.git", "url": "https://github.com/phpmyadmin/sql-parser.git",
"reference": "011fa18a4e55591fac6545a821921dd1d61c6984" "reference": "169a9f11f1957ea36607c9b29eac1b48679f1ecc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/011fa18a4e55591fac6545a821921dd1d61c6984", "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/169a9f11f1957ea36607c9b29eac1b48679f1ecc",
"reference": "011fa18a4e55591fac6545a821921dd1d61c6984", "reference": "169a9f11f1957ea36607c9b29eac1b48679f1ecc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -16161,8 +16239,7 @@
"phpstan/extension-installer": "^1.1", "phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.9.12", "phpstan/phpstan": "^1.9.12",
"phpstan/phpstan-phpunit": "^1.3.3", "phpstan/phpstan-phpunit": "^1.3.3",
"phpunit/php-code-coverage": "*", "phpunit/phpunit": "^8.5 || ^9.6",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psalm/plugin-phpunit": "^0.16.1", "psalm/plugin-phpunit": "^0.16.1",
"vimeo/psalm": "^4.11", "vimeo/psalm": "^4.11",
"zumba/json-serializer": "~3.0.2" "zumba/json-serializer": "~3.0.2"
@ -16218,20 +16295,20 @@
"type": "other" "type": "other"
} }
], ],
"time": "2024-01-20T20:34:02+00:00" "time": "2024-08-13T19:01:01+00:00"
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.11.9", "version": "1.11.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "e370bcddadaede0c1716338b262346f40d296f82" "reference": "640410b32995914bde3eed26fa89552f9c2c082f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e370bcddadaede0c1716338b262346f40d296f82", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/640410b32995914bde3eed26fa89552f9c2c082f",
"reference": "e370bcddadaede0c1716338b262346f40d296f82", "reference": "640410b32995914bde3eed26fa89552f9c2c082f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -16276,7 +16353,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-08-01T16:25:18+00:00" "time": "2024-08-08T09:02:50+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -16601,16 +16678,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "10.5.29", "version": "10.5.30",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f" "reference": "b15524febac0153876b4ba9aab3326c2ee94c897"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e9e80872b4e8064401788ee8a32d40b4455318f", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b15524febac0153876b4ba9aab3326c2ee94c897",
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f", "reference": "b15524febac0153876b4ba9aab3326c2ee94c897",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -16631,7 +16708,7 @@
"phpunit/php-timer": "^6.0.0", "phpunit/php-timer": "^6.0.0",
"sebastian/cli-parser": "^2.0.1", "sebastian/cli-parser": "^2.0.1",
"sebastian/code-unit": "^2.0.0", "sebastian/code-unit": "^2.0.0",
"sebastian/comparator": "^5.0.1", "sebastian/comparator": "^5.0.2",
"sebastian/diff": "^5.1.1", "sebastian/diff": "^5.1.1",
"sebastian/environment": "^6.1.0", "sebastian/environment": "^6.1.0",
"sebastian/exporter": "^5.1.2", "sebastian/exporter": "^5.1.2",
@ -16682,7 +16759,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.29" "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.30"
}, },
"funding": [ "funding": [
{ {
@ -16698,7 +16775,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-30T11:08:00+00:00" "time": "2024-08-13T06:09:37+00:00"
}, },
{ {
"name": "react/cache", "name": "react/cache",
@ -17400,16 +17477,16 @@
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
"version": "5.0.1", "version": "5.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git", "url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "2db5010a484d53ebf536087a70b4a5423c102372" "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
"reference": "2db5010a484d53ebf536087a70b4a5423c102372", "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -17420,7 +17497,7 @@
"sebastian/exporter": "^5.0" "sebastian/exporter": "^5.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.3" "phpunit/phpunit": "^10.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -17465,7 +17542,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues", "issues": "https://github.com/sebastianbergmann/comparator/issues",
"security": "https://github.com/sebastianbergmann/comparator/security/policy", "security": "https://github.com/sebastianbergmann/comparator/security/policy",
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2"
}, },
"funding": [ "funding": [
{ {
@ -17473,7 +17550,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-08-14T13:18:12+00:00" "time": "2024-08-12T06:03:08+00:00"
}, },
{ {
"name": "sebastian/complexity", "name": "sebastian/complexity",
@ -18588,82 +18665,6 @@
}, },
"time": "2024-07-21T01:46:03+00:00" "time": "2024-07-21T01:46:03+00:00"
}, },
{
"name": "symfony/polyfill-php81",
"version": "v1.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af",
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-06-19T12:30:46+00:00"
},
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v7.1.1", "version": "v7.1.1",

View File

@ -1,9 +0,0 @@
var r=Object.defineProperty;var l=(n,e,t)=>e in n?r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var d=(n,e,t)=>(l(n,typeof e!="symbol"?e+"":e,t),t);/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/class c{constructor(e){d(this,"handleAuthorization",()=>{var e=$("#my-card"),t={api_login_id:this.apiLoginId,card_number:e.CardJs("cardNumber").replace(/[^\d]/g,""),expire_year:e.CardJs("expiryYear").replace(/[^\d]/g,""),expire_month:e.CardJs("expiryMonth").replace(/[^\d]/g,""),cvv:document.getElementById("cvv").value.replace(/[^\d]/g,"")};return document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(t).success(this.successResponseHandler).error(this.failedResponseHandler),!1});d(this,"successResponseHandler",e=>{document.getElementById("payment_token").value=e.onetime_token,document.getElementById("card_brand").value=e.card_type,document.getElementById("expire_year").value=e.expire_year,document.getElementById("expire_month").value=e.expire_month,document.getElementById("last_4").value=e.last_4;let t=document.querySelector("input[name=token-billing-checkbox]:checked");return t&&(document.getElementById("store_card").value=t.value),document.getElementById("server_response").submit(),!1});d(this,"failedResponseHandler",e=>{var t='<div class="alert alert-failure mb-4"><ul><li>'+e.response_description+"</li></ul></div>";return document.getElementById("forte_errors").innerHTML=t,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1});d(this,"handle",()=>{Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(o=>o.addEventListener("click",a=>{document.getElementById("save-card--container").style.display="none",document.getElementById("forte--credit-card-container").style.display="none",document.getElementById("token").value=a.target.dataset.token}));let e=document.getElementById("toggle-payment-with-credit-card");e&&e.addEventListener("click",()=>{document.getElementById("save-card--container").style.display="grid",document.getElementById("forte--credit-card-container").style.display="flex",document.getElementById("token").value=null});let t=document.getElementById("pay-now");return t&&t.addEventListener("click",o=>{let a=document.getElementById("token");a.value?this.handlePayNowAction(a.value):this.handleAuthorization()}),this});this.apiLoginId=e,this.cardHolderName=document.getElementById("cardholder_name")}handlePayNowAction(e){document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),document.getElementById("token").value=e,document.getElementById("server_response").submit()}}const i=document.querySelector('meta[name="forte-api-login-id"]').content;new c(i).handle();

View File

@ -86,7 +86,7 @@
"src": "resources/js/clients/payments/forte-ach-payment.js" "src": "resources/js/clients/payments/forte-ach-payment.js"
}, },
"resources/js/clients/payments/forte-credit-card-payment.js": { "resources/js/clients/payments/forte-credit-card-payment.js": {
"file": "assets/forte-credit-card-payment-d2571506.js", "file": "assets/forte-credit-card-payment-7bb15431.js",
"isEntry": true, "isEntry": true,
"src": "resources/js/clients/payments/forte-credit-card-payment.js" "src": "resources/js/clients/payments/forte-credit-card-payment.js"
}, },