mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 13:44:31 -04:00
Fixes for taxes
This commit is contained in:
parent
3661f4d50b
commit
78e429d559
@ -176,7 +176,13 @@ class BaseRule implements RuleInterface
|
|||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
elseif($this->client_region == 'AU'){
|
||||||
|
|
||||||
|
$this->tax_rate1 = 10;
|
||||||
|
$this->tax_name1 = 'GST';
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
$this->tax_rate1 = $this->client->company->tax_data->regions->{$this->client_region}->subregions->{$this->client_subregion}->tax_rate;
|
$this->tax_rate1 = $this->client->company->tax_data->regions->{$this->client_region}->subregions->{$this->client_subregion}->tax_rate;
|
||||||
$this->tax_name1 = $this->client->company->tax_data->regions->{$this->client_region}->subregions->{$this->client_subregion}->tax_name;
|
$this->tax_name1 = $this->client->company->tax_data->regions->{$this->client_region}->subregions->{$this->client_subregion}->tax_name;
|
||||||
|
@ -97,6 +97,8 @@ class Response
|
|||||||
|
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
|
if(!$data)
|
||||||
|
return;
|
||||||
|
|
||||||
foreach($data as $key => $value){
|
foreach($data as $key => $value){
|
||||||
$this->{$key} = $value;
|
$this->{$key} = $value;
|
||||||
|
@ -146,7 +146,7 @@ class InvoiceItemSum
|
|||||||
|
|
||||||
$class = "App\DataMapper\Tax\\".$this->client->company->country()->iso_3166_2."\\Rule";
|
$class = "App\DataMapper\Tax\\".$this->client->company->country()->iso_3166_2."\\Rule";
|
||||||
|
|
||||||
$tax_data = new Response($this->invoice->tax_data);
|
$tax_data = new Response($this->invoice?->tax_data);
|
||||||
|
|
||||||
$this->rule = new $class();
|
$this->rule = new $class();
|
||||||
$this->rule
|
$this->rule
|
||||||
|
@ -20,6 +20,8 @@ class CreateXInvoice implements ShouldQueue
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
public $deleteWhenMissingModels = true;
|
||||||
|
|
||||||
public function __construct(private Invoice $invoice, private bool $alterPDF, private string $custom_pdf_path = "")
|
public function __construct(private Invoice $invoice, private bool $alterPDF, private string $custom_pdf_path = "")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'notify_vendor_when_paid' => (bool) $company->notify_vendor_when_paid,
|
'notify_vendor_when_paid' => (bool) $company->notify_vendor_when_paid,
|
||||||
'invoice_task_hours' => (bool) $company->invoice_task_hours,
|
'invoice_task_hours' => (bool) $company->invoice_task_hours,
|
||||||
'calculate_taxes' => (bool) $company->calculate_taxes,
|
'calculate_taxes' => (bool) $company->calculate_taxes,
|
||||||
'tax_data' => $company->tax_data ?: '',
|
'tax_data' => $company->tax_data ?: new \stdClass,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user