diff --git a/app/Factory/CloneQuoteToInvoiceFactory.php b/app/Factory/CloneQuoteToInvoiceFactory.php index b04b8104253d..0c17ed9de216 100644 --- a/app/Factory/CloneQuoteToInvoiceFactory.php +++ b/app/Factory/CloneQuoteToInvoiceFactory.php @@ -28,9 +28,9 @@ class CloneQuoteToInvoiceFactory unset($quote_array['invoice_id']); unset($quote_array['id']); unset($quote_array['invitations']); - unset($quote_array['terms']); - // unset($quote_array['public_notes']); - unset($quote_array['footer']); + //unset($quote_array['terms']); + //unset($quote_array['public_notes']); + //unset($quote_array['footer']); unset($quote_array['design_id']); foreach ($quote_array as $key => $value) { diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index 01d2d7526773..e3d2f15181fc 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -312,7 +312,7 @@ class AutoBillInvoice extends AbstractService $company_gateway = $gateway_token->gateway; //check if fees and limits are set - if (isset($company_gateway->fees_and_limits) && property_exists($company_gateway->fees_and_limits, $gateway_token->gateway_type_id)) + if (isset($company_gateway->fees_and_limits) && !is_array($company_gateway->fees_and_limits) && property_exists($company_gateway->fees_and_limits, $gateway_token->gateway_type_id)) { //if valid we keep this gateway_token if ($this->invoice->client->validGatewayForAmount($company_gateway->fees_and_limits->{$gateway_token->gateway_type_id}, $amount)) diff --git a/app/Services/Quote/ConvertQuote.php b/app/Services/Quote/ConvertQuote.php index 97f389b48484..23631b5baa01 100644 --- a/app/Services/Quote/ConvertQuote.php +++ b/app/Services/Quote/ConvertQuote.php @@ -39,7 +39,7 @@ class ConvertQuote { $invoice = CloneQuoteToInvoiceFactory::create($quote, $quote->user_id); $invoice->design_id = $this->decodePrimaryKey($this->client->getSetting('invoice_design_id')); - $invoice = $this->invoice_repo->save([], $invoice); + $invoice = $this->invoice_repo->save($invoice->toArray(), $invoice); $invoice->fresh();