Minor updates for Peppol classes

This commit is contained in:
David Bomba 2024-11-16 17:50:29 +11:00
parent 4597c32cf5
commit da37fe22c1
1 changed files with 2 additions and 2 deletions

View File

@ -1391,9 +1391,9 @@ class Peppol extends AbstractService
//EU => FOREIGN sale
}
elseif(in_array($this->invoice->client->country->iso_3166_2, $eu_countries)){
// elseif(in_array($country_code, $eu_countries) && in_array($this->invoice->client->country->iso_3166_2, $eu_countries)){
// EU Sale
if((isset($this->company->tax_data->regions->EU->has_sales_above_threshold) && $this->company->tax_data->regions->EU->has_sales_above_threshold) || !$this->invoice->client->has_valid_vat_number){ //over threshold - tax in buyer country
$country_code = $this->invoice->client->country->iso_3166_2;
if(isset($this->ninja_invoice->company->tax_data->regions->EU->subregions->{$country_code}->vat_number))