diff --git a/VERSION.txt b/VERSION.txt index d181d038aca9..2bbb7ab8e62f 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.8.42 \ No newline at end of file +5.8.43 \ No newline at end of file diff --git a/app/Services/Credit/CreditService.php b/app/Services/Credit/CreditService.php index 77409f913e37..ea3643de39ac 100644 --- a/app/Services/Credit/CreditService.php +++ b/app/Services/Credit/CreditService.php @@ -43,6 +43,11 @@ class CreditService return (new CreateEDocument($this->credit))->handle(); } + public function getEDocument($contact = null) + { + return $this->getECredit($contact); + } + /** * Applies the invoice number. * @return $this InvoiceService object diff --git a/app/Services/Email/EmailDefaults.php b/app/Services/Email/EmailDefaults.php index 19121cc12014..7586e991f888 100644 --- a/app/Services/Email/EmailDefaults.php +++ b/app/Services/Email/EmailDefaults.php @@ -320,8 +320,8 @@ class EmailDefaults } } /** E-Invoice xml file */ - if ($this->email->email_object->settings->enable_e_invoice && ! $this->email->email_object->entity instanceof PurchaseOrder) { - $xml_string = $this->email->email_object->entity->service()->getEInvoice(); + if ($this->email->email_object->settings->enable_e_invoice) { + $xml_string = $this->email->email_object->entity->service()->getEDocument(); if($xml_string) { $this->email->email_object->attachments = array_merge($this->email->email_object->attachments, [['file' => base64_encode($xml_string), 'name' => explode(".", $this->email->email_object->entity->getFileName('xml'))[0]."-e_invoice.xml"]]); diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 9378593f1208..776636bd0326 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -204,6 +204,11 @@ class InvoiceService return (new CreateEDocument($this->invoice))->handle(); } + public function getEDocument($contact = null) + { + return $this->getEInvoice($contact); + } + public function sendEmail($contact = null) { $send_email = new SendEmail($this->invoice, null, $contact); diff --git a/app/Services/PurchaseOrder/PurchaseOrderService.php b/app/Services/PurchaseOrder/PurchaseOrderService.php index 686329599f62..76601307b613 100644 --- a/app/Services/PurchaseOrder/PurchaseOrderService.php +++ b/app/Services/PurchaseOrder/PurchaseOrderService.php @@ -82,6 +82,11 @@ class PurchaseOrderService { return (new CreateEDocument($this->purchase_order))->handle(); } + public function getEDocument($contact = null) + { + return $this->getEPurchaseOrder($contact); + } + public function deleteEPurchaseOrder() { $this->purchase_order->load('invitations'); diff --git a/app/Services/Quote/QuoteService.php b/app/Services/Quote/QuoteService.php index f2ee47666a67..f8080e775932 100644 --- a/app/Services/Quote/QuoteService.php +++ b/app/Services/Quote/QuoteService.php @@ -78,6 +78,11 @@ class QuoteService return (new CreateEDocument($this->quote))->handle(); } + public function getEDocument($contact = null) + { + return $this->getEQuote($contact); + } + public function sendEmail($contact = null): self { $send_email = new SendEmail($this->quote, null, $contact); diff --git a/config/ninja.php b/config/ninja.php index 54b69fc36e01..0b2b054b41c8 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -17,8 +17,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION', '5.8.42'), - 'app_tag' => env('APP_TAG', '5.8.42'), + 'app_version' => env('APP_VERSION', '5.8.43'), + 'app_tag' => env('APP_TAG', '5.8.43'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false), @@ -101,7 +101,6 @@ return [ 'wepay' => env('WEPAY_KEYS', ''), 'braintree' => env('BRAINTREE_KEYS', ''), 'mollie' => env('MOLLIE_KEYS', ''), - 'square' => env('SQUARE_KEYS', ''), ], 'contact' => [ 'email' => env('MAIL_FROM_ADDRESS'), diff --git a/resources/views/react/index.blade.php b/resources/views/react/index.blade.php index 845923485334..a70107a22ea6 100644 --- a/resources/views/react/index.blade.php +++ b/resources/views/react/index.blade.php @@ -1 +1,31 @@ - + + + + + + {{ config('ninja.app_name') }} + + + @include('react.head') + + + + + +
+ + + + +