mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for scheduler tests
This commit is contained in:
parent
4e92f9ad3c
commit
36269e4e1b
@ -148,8 +148,8 @@ class BaseRule implements RuleInterface
|
||||
{
|
||||
/* If the client Country is not in the region_codes, we force the company country onto the client? @TODO */
|
||||
if(!array_key_exists($this->client->country->iso_3166_2, $this->region_codes)) {
|
||||
$this->client->country_id = $this->invoice->company->settings->country_id;
|
||||
$this->client->saveQuietly();
|
||||
// $this->client->country_id = $this->invoice->company->settings->country_id;
|
||||
// $this->client->saveQuietly();
|
||||
|
||||
nlog('Automatic tax calculations not supported for this country - defaulting to company country');
|
||||
|
||||
|
@ -144,7 +144,10 @@ class InvoiceItemSum
|
||||
return $this;
|
||||
}
|
||||
|
||||
if (in_array($this->client->company->country()->iso_3166_2, $this->tax_jurisdictions)) { //only calculate for supported tax jurisdictions
|
||||
if (in_array($this->client->company->country()->iso_3166_2, $this->tax_jurisdictions) && in_array($this->client->country->iso_3166_2, $this->tax_jurisdictions)) { //only calculate for supported tax jurisdictions
|
||||
|
||||
nlog($this->client->country->iso_3166_2);
|
||||
nlog($this->client->company->country()->iso_3166_2);
|
||||
|
||||
$class = "App\DataMapper\Tax\\".$this->client->company->country()->iso_3166_2."\\Rule";
|
||||
|
||||
|
@ -100,7 +100,7 @@ class SchedulerTest extends TestCase
|
||||
'clients' => [],
|
||||
'report_keys' => [],
|
||||
'client_id' => $this->client->hashed_id,
|
||||
'report_name' => 'product_sales_report',
|
||||
'report_name' => 'product_sales',
|
||||
|
||||
],
|
||||
];
|
||||
@ -147,7 +147,7 @@ class SchedulerTest extends TestCase
|
||||
'clients' => [$this->client->hashed_id],
|
||||
'report_keys' => [],
|
||||
'client_id' => null,
|
||||
'report_name' => 'product_sales_report',
|
||||
'report_name' => 'product_sales',
|
||||
],
|
||||
];
|
||||
|
||||
@ -193,7 +193,7 @@ class SchedulerTest extends TestCase
|
||||
'clients' => [],
|
||||
'report_keys' => [],
|
||||
'client_id' => null,
|
||||
'report_name' => 'product_sales_report',
|
||||
'report_name' => 'product_sales',
|
||||
],
|
||||
];
|
||||
|
||||
@ -234,7 +234,7 @@ class SchedulerTest extends TestCase
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::LAST_MONTH,
|
||||
'clients' => [],
|
||||
'report_name' => 'product_sales_report',
|
||||
'report_name' => 'product_sales',
|
||||
],
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user