Fixes for subscriptions
This commit is contained in:
parent
4fbc3d7629
commit
6a1df87c0b
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