diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php index e4cb852c76..02045ce289 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 9cf918d99d..8b6591219b 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); }