Handle deleted account when charging renewals

This commit is contained in:
Hillel Coren 2016-07-20 22:53:54 +03:00
parent 8bc3d6c937
commit fa18feb8e5

View File

@ -72,6 +72,9 @@ class ChargeRenewalInvoices extends Command
// check if account has switched to free since the invoice was created
$account = Account::find($invoice->client->public_id);
if ( ! $account) {
continue;
}
$company = $account->company;
if ( ! $company->plan || $company->plan == PLAN_FREE) {
continue;