diff --git a/app/DataMapper/Tax/BaseRule.php b/app/DataMapper/Tax/BaseRule.php index 979ab3f07b..8835814788 100644 --- a/app/DataMapper/Tax/BaseRule.php +++ b/app/DataMapper/Tax/BaseRule.php @@ -20,37 +20,6 @@ class BaseRule implements RuleInterface { /** EU TAXES */ - - public array $distance_selling_thresholds = [ - "AT" => 35000, - "BE" => 35000, - "BG" => 35800, - "HR" => 35900, - "CY" => 0, // Cyprus does not have a distance selling threshold, so for cyprus buyers and sellers always use this rate - "CZ" => 44200, - "DK" => 37500, - "EE" => 35000, - "FI" => 35000, - "FR" => 35000, - "DE" => 100000, - "GR" => 35000, - "HU" => 25000, - "IE" => 35000, - "IT" => 35000, - "LV" => 35000, - "LT" => 35000, - "LU" => 100000, - "MT" => 35000, - "NL" => 100000, - "PL" => 36900, - "PT" => 35000, - "RO" => 24200, - "SK" => 35000, - "SI" => 35000, - "ES" => 35000, - "SE" => 31700 - ]; - public float $vat_rate = 19; public float $vat_threshold = 10000; public float $vat_reduced_rate = 7; @@ -202,7 +171,7 @@ class BaseRule implements RuleInterface } match ($product_tax_type) { - Product::PRODUCT_TAX_EXEMPT => $this->taxExempt(), + Product::PRODUCT_TYPE_EXEMPT => $this->taxExempt(), Product::PRODUCT_TYPE_DIGITAL => $this->taxDigital(), Product::PRODUCT_TYPE_SERVICE => $this->taxService(), Product::PRODUCT_TYPE_SHIPPING => $this->taxShipping(), diff --git a/app/DataMapper/Tax/de/Rule.php b/app/DataMapper/Tax/de/Rule.php index 3d2cf48230..b5ef00ddf9 100644 --- a/app/DataMapper/Tax/de/Rule.php +++ b/app/DataMapper/Tax/de/Rule.php @@ -96,7 +96,7 @@ class Rule extends BaseRule implements RuleInterface return $this; match($product_tax_type){ - Product::PRODUCT_TAX_EXEMPT => $this->taxExempt(), + Product::PRODUCT_TYPE_EXEMPT => $this->taxExempt(), Product::PRODUCT_TYPE_DIGITAL => $this->taxDigital(), Product::PRODUCT_TYPE_SERVICE => $this->taxService(), Product::PRODUCT_TYPE_SHIPPING => $this->taxShipping(), diff --git a/app/DataMapper/Tax/us/Rule.php b/app/DataMapper/Tax/us/Rule.php index bc90457d54..b799eb1e45 100644 --- a/app/DataMapper/Tax/us/Rule.php +++ b/app/DataMapper/Tax/us/Rule.php @@ -73,7 +73,7 @@ class Rule implements RuleInterface } match($product_tax_type){ - Product::PRODUCT_TAX_EXEMPT => $this->taxExempt(), + Product::PRODUCT_TYPE_EXEMPT => $this->taxExempt(), Product::PRODUCT_TYPE_DIGITAL => $this->taxDigital(), Product::PRODUCT_TYPE_SERVICE => $this->taxService(), Product::PRODUCT_TYPE_SHIPPING => $this->taxShipping(), diff --git a/app/Http/Requests/Invoice/UploadInvoiceRequest.php b/app/Http/Requests/Invoice/UploadInvoiceRequest.php index 93396d9ee7..070fb4443d 100644 --- a/app/Http/Requests/Invoice/UploadInvoiceRequest.php +++ b/app/Http/Requests/Invoice/UploadInvoiceRequest.php @@ -12,6 +12,7 @@ namespace App\Http\Requests\Invoice; use App\Http\Requests\Request; +use Illuminate\Http\UploadedFile; class UploadInvoiceRequest extends Request { @@ -46,5 +47,24 @@ class UploadInvoiceRequest extends Request public function prepareForValidation() { + + //tests to see if upload via binary data works. + + // if(request()->getContent()) + // { + // // $file = new UploadedFile(request()->getContent(), request()->header('filename')); + // $file = new UploadedFile(request()->getContent(), 'something.png'); + // // request()->files->set('documents', $file); + + // $this->files->add(['file' => $file]); + + // // Merge it in request also (As I found this is not needed in every case) + // $this->merge(['file' => $file]); + + + // } + + + } } diff --git a/app/Models/Product.php b/app/Models/Product.php index f196f80c43..12a5c9c9f1 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -117,7 +117,7 @@ class Product extends BaseModel public const PRODUCT_TYPE_SERVICE = 2; public const PRODUCT_TYPE_DIGITAL = 3; public const PRODUCT_TYPE_SHIPPING = 4; - public const PRODUCT_TAX_EXEMPT = 5; + public const PRODUCT_TYPE_EXEMPT = 5; public const PRODUCT_TYPE_REDUCED_TAX = 6; protected $fillable = [ diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 36cd4e2722..cb51089e32 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -374,7 +374,6 @@ class HtmlEngine $data['$user_iban'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'company1', $this->settings->custom_value1, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'company1')]; - $data['$invoice.public_notes'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->public_notes ?: ''), $this->client) ?: '', 'label' => ctrans('texts.public_notes')]; $data['$entity.public_notes'] = &$data['$invoice.public_notes']; $data['$public_notes'] = &$data['$invoice.public_notes'];