mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for subscription cancellation where there are no outstanding invoices present to refund
This commit is contained in:
parent
ecfd306fd7
commit
420cb19701
@ -923,7 +923,7 @@ class SubscriptionService
|
|||||||
$recurring_invoice_repo->archive($recurring_invoice);
|
$recurring_invoice_repo->archive($recurring_invoice);
|
||||||
|
|
||||||
/* Refund only if we are in the window - and there is nothing outstanding on the invoice */
|
/* Refund only if we are in the window - and there is nothing outstanding on the invoice */
|
||||||
if($refund_end_date->greaterThan(now()) && (int)$outstanding_invoice->balance == 0)
|
if($refund_end_date && $refund_end_date->greaterThan(now()) && (int)$outstanding_invoice->balance == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($outstanding_invoice->payments()->exists())
|
if($outstanding_invoice->payments()->exists())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user