diff --git a/app/Jobs/Company/CompanyImport.php b/app/Jobs/Company/CompanyImport.php index 1d0a95a898ee..f415371204ee 100644 --- a/app/Jobs/Company/CompanyImport.php +++ b/app/Jobs/Company/CompanyImport.php @@ -1455,7 +1455,15 @@ class CompanyImport implements ShouldQueue $obj_array['config'] = encrypt($obj_array['config']); } + /** + * @class \stdClass $parameters + * + * @property string $entity + * @property string $entity_id + */ + if($class == 'App\Models\Scheduler') { + $parameters = $obj_array['parameters']; if(isset($parameters->clients)){ diff --git a/composer.lock b/composer.lock index f2126fc368cc..630eb189ccfd 100644 --- a/composer.lock +++ b/composer.lock @@ -485,16 +485,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.283.16", + "version": "3.285.3", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "cb629771356d6a4d12bb030a072b832044440672" + "reference": "afa1e722f1b2c95644f375dc1a19072e4daf67be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/cb629771356d6a4d12bb030a072b832044440672", - "reference": "cb629771356d6a4d12bb030a072b832044440672", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/afa1e722f1b2c95644f375dc1a19072e4daf67be", + "reference": "afa1e722f1b2c95644f375dc1a19072e4daf67be", "shasum": "" }, "require": { @@ -574,9 +574,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.283.16" + "source": "https://github.com/aws/aws-sdk-php/tree/3.285.3" }, - "time": "2023-10-31T18:21:09+00:00" + "time": "2023-11-09T19:07:19+00:00" }, { "name": "bacon/bacon-qr-code", @@ -634,16 +634,16 @@ }, { "name": "beganovich/snappdf", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/beganovich/snappdf.git", - "reference": "37b782fa14034f91657f2490bcd1380bb5532d69" + "reference": "afb188d8370a35db3b6ce4b6f2ef2963d7005891" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beganovich/snappdf/zipball/37b782fa14034f91657f2490bcd1380bb5532d69", - "reference": "37b782fa14034f91657f2490bcd1380bb5532d69", + "url": "https://api.github.com/repos/beganovich/snappdf/zipball/afb188d8370a35db3b6ce4b6f2ef2963d7005891", + "reference": "afb188d8370a35db3b6ce4b6f2ef2963d7005891", "shasum": "" }, "require": { @@ -680,22 +680,22 @@ "description": "Convert webpages or HTML into the PDF file using Chromium or Google Chrome.", "support": { "issues": "https://github.com/beganovich/snappdf/issues", - "source": "https://github.com/beganovich/snappdf/tree/v4.0.1" + "source": "https://github.com/beganovich/snappdf/tree/v4.0.2" }, - "time": "2023-08-24T12:47:07+00:00" + "time": "2023-11-06T21:44:50+00:00" }, { "name": "braintree/braintree_php", - "version": "6.14.0", + "version": "6.15.0", "source": { "type": "git", "url": "https://github.com/braintree/braintree_php.git", - "reference": "084ed5bb728bc32ad444c6d043c87b409cca72d7" + "reference": "16efb08e19cb6c579deba11e119ef6409d28eae3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/braintree/braintree_php/zipball/084ed5bb728bc32ad444c6d043c87b409cca72d7", - "reference": "084ed5bb728bc32ad444c6d043c87b409cca72d7", + "url": "https://api.github.com/repos/braintree/braintree_php/zipball/16efb08e19cb6c579deba11e119ef6409d28eae3", + "reference": "16efb08e19cb6c579deba11e119ef6409d28eae3", "shasum": "" }, "require": { @@ -729,9 +729,9 @@ "description": "Braintree PHP Client Library", "support": { "issues": "https://github.com/braintree/braintree_php/issues", - "source": "https://github.com/braintree/braintree_php/tree/6.14.0" + "source": "https://github.com/braintree/braintree_php/tree/6.15.0" }, - "time": "2023-10-18T22:00:15+00:00" + "time": "2023-11-08T00:15:11+00:00" }, { "name": "brick/math", @@ -2487,16 +2487,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.322.0", + "version": "v0.323.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "e892db67c88eb119de0c12aa2419b48401555ded" + "reference": "d5497d30ddfafe7592102ca48bedaf222a4ca7a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/e892db67c88eb119de0c12aa2419b48401555ded", - "reference": "e892db67c88eb119de0c12aa2419b48401555ded", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/d5497d30ddfafe7592102ca48bedaf222a4ca7a6", + "reference": "d5497d30ddfafe7592102ca48bedaf222a4ca7a6", "shasum": "" }, "require": { @@ -2525,9 +2525,9 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.322.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.323.0" }, - "time": "2023-10-29T01:10:18+00:00" + "time": "2023-11-06T01:08:38+00:00" }, { "name": "google/auth", @@ -4230,16 +4230,16 @@ }, { "name": "laravel/framework", - "version": "v10.30.0", + "version": "v10.31.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "3dd85d9dbea82b937f8eaf344b50d613c5d1127a" + "reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/3dd85d9dbea82b937f8eaf344b50d613c5d1127a", - "reference": "3dd85d9dbea82b937f8eaf344b50d613c5d1127a", + "url": "https://api.github.com/repos/laravel/framework/zipball/507ce9b28bce4b5e4140c28943092ca38e9a52e4", + "reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4", "shasum": "" }, "require": { @@ -4428,7 +4428,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-10-31T13:19:45+00:00" + "time": "2023-11-07T13:48:30+00:00" }, { "name": "laravel/prompts", @@ -5225,16 +5225,16 @@ }, { "name": "league/flysystem", - "version": "3.18.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "015633a05aee22490495159237a5944091d8281e" + "reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/015633a05aee22490495159237a5944091d8281e", - "reference": "015633a05aee22490495159237a5944091d8281e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1b2aa10f2326e0351399b8ce68e287d8e9209a83", + "reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83", "shasum": "" }, "require": { @@ -5299,7 +5299,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.18.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.19.0" }, "funding": [ { @@ -5311,20 +5311,20 @@ "type": "github" } ], - "time": "2023-10-20T17:59:40+00:00" + "time": "2023-11-07T09:04:28+00:00" }, { "name": "league/flysystem-aws-s3-v3", - "version": "3.16.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", - "reference": "ded9ba346bb01cb9cc4cc7f2743c2c0e14d18e1c" + "reference": "03be643c8ed4dea811d946101be3bc875b5cf214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/ded9ba346bb01cb9cc4cc7f2743c2c0e14d18e1c", - "reference": "ded9ba346bb01cb9cc4cc7f2743c2c0e14d18e1c", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/03be643c8ed4dea811d946101be3bc875b5cf214", + "reference": "03be643c8ed4dea811d946101be3bc875b5cf214", "shasum": "" }, "require": { @@ -5365,7 +5365,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", - "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.16.0" + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.19.0" }, "funding": [ { @@ -5377,20 +5377,20 @@ "type": "github" } ], - "time": "2023-08-30T10:14:57+00:00" + "time": "2023-11-06T20:35:28+00:00" }, { "name": "league/flysystem-local", - "version": "3.18.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32" + "reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e7381ef7643f658b87efb7dbe98fe538fb1bbf32", - "reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/8d868217f9eeb4e9a7320db5ccad825e9a7a4076", + "reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076", "shasum": "" }, "require": { @@ -5425,7 +5425,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem-local/issues", - "source": "https://github.com/thephpleague/flysystem-local/tree/3.18.0" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.19.0" }, "funding": [ { @@ -5437,7 +5437,7 @@ "type": "github" } ], - "time": "2023-10-19T20:07:13+00:00" + "time": "2023-11-06T20:35:28+00:00" }, { "name": "league/fractal", @@ -5779,16 +5779,16 @@ }, { "name": "microsoft/microsoft-graph", - "version": "1.108.0", + "version": "1.109.0", "source": { "type": "git", "url": "https://github.com/microsoftgraph/msgraph-sdk-php.git", - "reference": "96b940ab530c693832648bdf5ffbb975e29d2233" + "reference": "14b1b9f24a6b6ace91323b1121030c96a0988ee0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/96b940ab530c693832648bdf5ffbb975e29d2233", - "reference": "96b940ab530c693832648bdf5ffbb975e29d2233", + "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/14b1b9f24a6b6ace91323b1121030c96a0988ee0", + "reference": "14b1b9f24a6b6ace91323b1121030c96a0988ee0", "shasum": "" }, "require": { @@ -5825,22 +5825,22 @@ "homepage": "https://developer.microsoft.com/en-us/graph", "support": { "issues": "https://github.com/microsoftgraph/msgraph-sdk-php/issues", - "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.108.0" + "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.109.0" }, - "time": "2023-10-11T11:00:38+00:00" + "time": "2023-11-02T10:25:39+00:00" }, { "name": "mollie/mollie-api-php", - "version": "v2.62.0", + "version": "v2.63.0", "source": { "type": "git", "url": "https://github.com/mollie/mollie-api-php.git", - "reference": "feb6d52859ed1ea7a65b25bb6cbfaadb04b33827" + "reference": "642f1b87624bd1535cd198134113e14bc01ba245" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/feb6d52859ed1ea7a65b25bb6cbfaadb04b33827", - "reference": "feb6d52859ed1ea7a65b25bb6cbfaadb04b33827", + "url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/642f1b87624bd1535cd198134113e14bc01ba245", + "reference": "642f1b87624bd1535cd198134113e14bc01ba245", "shasum": "" }, "require": { @@ -5917,9 +5917,9 @@ ], "support": { "issues": "https://github.com/mollie/mollie-api-php/issues", - "source": "https://github.com/mollie/mollie-api-php/tree/v2.62.0" + "source": "https://github.com/mollie/mollie-api-php/tree/v2.63.0" }, - "time": "2023-10-23T11:22:58+00:00" + "time": "2023-11-06T09:20:50+00:00" }, { "name": "moneyphp/money", @@ -6648,16 +6648,16 @@ }, { "name": "nwidart/laravel-modules", - "version": "10.0.2", + "version": "10.0.3", "source": { "type": "git", "url": "https://github.com/nWidart/laravel-modules.git", - "reference": "ef67a7367223ab96539136116d69405d1c21c321" + "reference": "786da1e6dfa2df6caa8718acb9c37a8fe94595b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/ef67a7367223ab96539136116d69405d1c21c321", - "reference": "ef67a7367223ab96539136116d69405d1c21c321", + "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/786da1e6dfa2df6caa8718acb9c37a8fe94595b3", + "reference": "786da1e6dfa2df6caa8718acb9c37a8fe94595b3", "shasum": "" }, "require": { @@ -6717,15 +6717,19 @@ ], "support": { "issues": "https://github.com/nWidart/laravel-modules/issues", - "source": "https://github.com/nWidart/laravel-modules/tree/10.0.2" + "source": "https://github.com/nWidart/laravel-modules/tree/10.0.3" }, "funding": [ + { + "url": "https://github.com/dcblogdev", + "type": "github" + }, { "url": "https://github.com/nwidart", "type": "github" } ], - "time": "2023-10-18T19:14:29+00:00" + "time": "2023-11-02T17:47:33+00:00" }, { "name": "nyholm/psr7", @@ -7609,16 +7613,16 @@ }, { "name": "php-http/promise", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/php-http/promise.git", - "reference": "ef4905bfb492ff389eb7f12e26925a0f20073050" + "reference": "44a67cb59f708f826f3bec35f22030b3edb90119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/ef4905bfb492ff389eb7f12e26925a0f20073050", - "reference": "ef4905bfb492ff389eb7f12e26925a0f20073050", + "url": "https://api.github.com/repos/php-http/promise/zipball/44a67cb59f708f826f3bec35f22030b3edb90119", + "reference": "44a67cb59f708f826f3bec35f22030b3edb90119", "shasum": "" }, "require": { @@ -7655,9 +7659,9 @@ ], "support": { "issues": "https://github.com/php-http/promise/issues", - "source": "https://github.com/php-http/promise/tree/1.2.0" + "source": "https://github.com/php-http/promise/tree/1.2.1" }, - "time": "2023-10-24T09:20:26+00:00" + "time": "2023-11-08T12:57:08+00:00" }, { "name": "php-jsonpointer/php-jsonpointer", @@ -8908,16 +8912,16 @@ }, { "name": "ramsey/uuid", - "version": "4.7.4", + "version": "4.7.5", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "60a4c63ab724854332900504274f6150ff26d286" + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", - "reference": "60a4c63ab724854332900504274f6150ff26d286", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", "shasum": "" }, "require": { @@ -8984,7 +8988,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.4" + "source": "https://github.com/ramsey/uuid/tree/4.7.5" }, "funding": [ { @@ -8996,7 +9000,7 @@ "type": "tidelift" } ], - "time": "2023-04-15T23:01:58+00:00" + "time": "2023-11-08T05:53:05+00:00" }, { "name": "razorpay/razorpay", @@ -9065,16 +9069,16 @@ }, { "name": "rmccue/requests", - "version": "v2.0.8", + "version": "v2.0.9", "source": { "type": "git", "url": "https://github.com/WordPress/Requests.git", - "reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519" + "reference": "422612952ff3bd5163039f8889eaaaab95a432eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/Requests/zipball/fae75bcb83d9d00d0e31ee86a472a036f9f91519", - "reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519", + "url": "https://api.github.com/repos/WordPress/Requests/zipball/422612952ff3bd5163039f8889eaaaab95a432eb", + "reference": "422612952ff3bd5163039f8889eaaaab95a432eb", "shasum": "" }, "require": { @@ -9148,7 +9152,7 @@ "issues": "https://github.com/WordPress/Requests/issues", "source": "https://github.com/WordPress/Requests" }, - "time": "2023-09-11T08:27:57+00:00" + "time": "2023-11-08T19:22:04+00:00" }, { "name": "sabre/uri", @@ -14750,16 +14754,16 @@ }, { "name": "filp/whoops", - "version": "2.15.3", + "version": "2.15.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", + "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", "shasum": "" }, "require": { @@ -14809,7 +14813,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.3" + "source": "https://github.com/filp/whoops/tree/2.15.4" }, "funding": [ { @@ -14817,20 +14821,20 @@ "type": "github" } ], - "time": "2023-07-13T12:00:00+00:00" + "time": "2023-11-03T12:00:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.37.1", + "version": "v3.38.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "c3fe76976081ab871aa654e872da588077e19679" + "reference": "7e6070026e76aa09d77a47519625c86593fb8e31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c3fe76976081ab871aa654e872da588077e19679", - "reference": "c3fe76976081ab871aa654e872da588077e19679", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7e6070026e76aa09d77a47519625c86593fb8e31", + "reference": "7e6070026e76aa09d77a47519625c86593fb8e31", "shasum": "" }, "require": { @@ -14902,7 +14906,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.37.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.38.0" }, "funding": [ { @@ -14910,7 +14914,7 @@ "type": "github" } ], - "time": "2023-10-29T20:51:23+00:00" + "time": "2023-11-07T08:44:54+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -15624,16 +15628,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.40", + "version": "1.10.41", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "93c84b5bf7669920d823631e39904d69b9c7dc5d" + "reference": "c6174523c2a69231df55bdc65b61655e72876d76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/93c84b5bf7669920d823631e39904d69b9c7dc5d", - "reference": "93c84b5bf7669920d823631e39904d69b9c7dc5d", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c6174523c2a69231df55bdc65b61655e72876d76", + "reference": "c6174523c2a69231df55bdc65b61655e72876d76", "shasum": "" }, "require": { @@ -15682,7 +15686,7 @@ "type": "tidelift" } ], - "time": "2023-10-30T14:48:31+00:00" + "time": "2023-11-05T12:57:57+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/tests/Unit/AutoBillInvoiceTest.php b/tests/Unit/AutoBillInvoiceTest.php index c4a2f5a761b0..b574256ea290 100644 --- a/tests/Unit/AutoBillInvoiceTest.php +++ b/tests/Unit/AutoBillInvoiceTest.php @@ -40,7 +40,9 @@ class AutoBillInvoiceTest extends TestCase $this->invoice->service()->markSent()->autoBill(); $this->assertNotNull($this->invoice->payments()); - $this->assertEquals(10, $this->invoice->payments()->sum('payments.amount')); + $this->assertEquals(0, $this->invoice->payments()->sum('payments.amount')); + + $this->assertEquals(10, $this->invoice->payments()->get()->sum('pivot.amount')); $this->assertEquals($this->client->fresh()->balance, 0); $this->assertEquals($this->client->fresh()->paid_to_date, 10);