1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Fixes for credits

This commit is contained in:
David Bomba 2022-03-01 08:39:30 +11:00
parent d25f84c11e
commit 313ea3e9fb

View File

@ -412,7 +412,10 @@ class SubscriptionService
->orderBy('id', 'desc')
->first();
if(!$last_invoice){
if($recurring_invoice->invoices()->count() == 0){
$pro_rata_refund_amount = 0;
}
elseif(!$last_invoice){
$is_credit = true;