From fb9bb7e269d8f59214651e857fd419a79751cefe Mon Sep 17 00:00:00 2001 From: = Date: Wed, 24 Mar 2021 09:28:12 +1100 Subject: [PATCH] Fixes for converting quote to invoice --- app/Http/Controllers/QuoteController.php | 2 +- app/Services/BillingSubscription/BillingSubscriptionService.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php index e4cb852c767b..02045ce2897f 100644 --- a/app/Http/Controllers/QuoteController.php +++ b/app/Http/Controllers/QuoteController.php @@ -532,7 +532,7 @@ class QuoteController extends BaseController return response()->json(['message' => ctrans('texts.sent_message')], 200); } - if ($action == 'convert') { + if ($action == 'convert' || $action == 'convert_to_invoice') { $this->entity_type = Quote::class; $this->entity_transformer = QuoteTransformer::class; diff --git a/app/Services/BillingSubscription/BillingSubscriptionService.php b/app/Services/BillingSubscription/BillingSubscriptionService.php index 9cf918d99dc2..8b6591219b73 100644 --- a/app/Services/BillingSubscription/BillingSubscriptionService.php +++ b/app/Services/BillingSubscription/BillingSubscriptionService.php @@ -192,6 +192,7 @@ class BillingSubscriptionService throw new \Exception("Could not match an invoice for payment of billing subscription"); //todo - need to remove the promo code - if it exists + return InvoiceToRecurringInvoiceFactory::create($invoice); }