Merge pull request #6157 from turbo124/v5-develop
Fixes for subscriptions
This commit is contained in:
commit
07e4cc715a
1 changed files with 2 additions and 2 deletions
|
|
@ -249,7 +249,7 @@ class SubscriptionService
|
|||
*/
|
||||
private function calculateProRataRefundForSubscription($invoice) :float
|
||||
{
|
||||
if(!$invoice->date)
|
||||
if(!$invoice || !$invoice->date)
|
||||
return 0;
|
||||
|
||||
$start_date = Carbon::parse($invoice->date);
|
||||
|
|
@ -278,7 +278,7 @@ class SubscriptionService
|
|||
*/
|
||||
private function calculateProRataRefund($invoice) :float
|
||||
{
|
||||
if(!$invoice->date)
|
||||
if(!$invoice || !$invoice->date)
|
||||
return 0;
|
||||
|
||||
$start_date = Carbon::parse($invoice->date);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue