mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tax providers and blank credentials
This commit is contained in:
parent
59130006b9
commit
d308173500
@ -75,18 +75,20 @@ class TaxProvider
|
||||
*/
|
||||
public function updateCompanyTaxData(): self
|
||||
{
|
||||
$this->configureProvider($this->provider, $this->company->country()->iso_3166_2); //hard coded for now to one provider, but we'll be able to swap these out later
|
||||
|
||||
$company_details = [
|
||||
'address2' => $this->company->settings->address2,
|
||||
'address1' => $this->company->settings->address1,
|
||||
'city' => $this->company->settings->city,
|
||||
'state' => $this->company->settings->state,
|
||||
'postal_code' => $this->company->settings->postal_code,
|
||||
'country' => $this->company->country()->name,
|
||||
];
|
||||
|
||||
try {
|
||||
|
||||
$this->configureProvider($this->provider, $this->company->country()->iso_3166_2); //hard coded for now to one provider, but we'll be able to swap these out later
|
||||
|
||||
$company_details = [
|
||||
'address2' => $this->company->settings->address2,
|
||||
'address1' => $this->company->settings->address1,
|
||||
'city' => $this->company->settings->city,
|
||||
'state' => $this->company->settings->state,
|
||||
'postal_code' => $this->company->settings->postal_code,
|
||||
'country' => $this->company->country()->name,
|
||||
];
|
||||
|
||||
$tax_provider = new $this->provider($company_details);
|
||||
|
||||
$tax_provider->setApiCredentials($this->api_credentials);
|
||||
@ -143,7 +145,7 @@ class TaxProvider
|
||||
|
||||
$tax_data = $tax_provider->run();
|
||||
|
||||
nlog($tax_data);
|
||||
// nlog($tax_data);
|
||||
|
||||
if($tax_data) {
|
||||
$this->client->tax_data = $tax_data;
|
||||
|
36
composer.lock
generated
36
composer.lock
generated
@ -525,16 +525,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.281.7",
|
||||
"version": "3.281.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "926cea9a41a545ca9801ac304f2a9ffd23ac68c9"
|
||||
"reference": "eb349b9f31502a05c70362f57913b9fed6b65b1f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/926cea9a41a545ca9801ac304f2a9ffd23ac68c9",
|
||||
"reference": "926cea9a41a545ca9801ac304f2a9ffd23ac68c9",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/eb349b9f31502a05c70362f57913b9fed6b65b1f",
|
||||
"reference": "eb349b9f31502a05c70362f57913b9fed6b65b1f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -614,9 +614,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.281.7"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.281.8"
|
||||
},
|
||||
"time": "2023-09-14T18:05:11+00:00"
|
||||
"time": "2023-09-15T18:34:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -8062,16 +8062,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "3.0.21",
|
||||
"version": "3.0.22",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1"
|
||||
"reference": "b6bd1c5f79b2c39e144770eb6d9180fbdb00d09b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1",
|
||||
"reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/b6bd1c5f79b2c39e144770eb6d9180fbdb00d09b",
|
||||
"reference": "b6bd1c5f79b2c39e144770eb6d9180fbdb00d09b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -8152,7 +8152,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.21"
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.22"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -8168,7 +8168,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-07-09T15:24:48+00:00"
|
||||
"time": "2023-09-16T11:49:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
@ -15793,16 +15793,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmyadmin/sql-parser",
|
||||
"version": "5.8.0",
|
||||
"version": "5.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpmyadmin/sql-parser.git",
|
||||
"reference": "db1b3069b5dbc220d393d67ff911e0ae76732755"
|
||||
"reference": "b877ee6262a00f0f498da5e01335e8a5dc01d203"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/db1b3069b5dbc220d393d67ff911e0ae76732755",
|
||||
"reference": "db1b3069b5dbc220d393d67ff911e0ae76732755",
|
||||
"url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/b877ee6262a00f0f498da5e01335e8a5dc01d203",
|
||||
"reference": "b877ee6262a00f0f498da5e01335e8a5dc01d203",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -15824,7 +15824,7 @@
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||
"psalm/plugin-phpunit": "^0.16.1",
|
||||
"vimeo/psalm": "^4.11",
|
||||
"zumba/json-serializer": "^3.0"
|
||||
"zumba/json-serializer": "~3.0.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance",
|
||||
@ -15876,7 +15876,7 @@
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2023-06-05T18:19:38+00:00"
|
||||
"time": "2023-09-15T18:21:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
|
Loading…
x
Reference in New Issue
Block a user