1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Merge pull request #4826 from turbo124/master

Fixes for migrations
This commit is contained in:
David Bomba 2021-02-03 23:30:56 +11:00 committed by GitHub
commit 5eb3f89650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -82,7 +82,6 @@ class CheckData extends Command
}
//$this->checkInvoices();
$this->checkTranslations();
$this->checkInvoiceBalances();
$this->checkClientBalances();
$this->checkContacts();
@ -97,6 +96,7 @@ class CheckData extends Command
$this->checkFailedJobs();
}
$this->checkTranslations();
$this->logMessage('Done: ' . strtoupper($this->isValid ? RESULT_SUCCESS : RESULT_FAILURE));
$errorEmail = env('ERROR_EMAIL');

View File

@ -34,7 +34,8 @@ trait GenerateMigrationResources
protected function getAccount()
{
info("get account");
info("get account");
if($this->account->account_tokens()->exists()){
$this->token = $this->account->account_tokens->first()->token;
}
@ -72,6 +73,7 @@ info("get account");
info("get company");
return [
'version' => NINJA_VERSION,
'referral_code' => $this->account->referral_code ?: '',
'account_id' => $this->account->id,
'google_analytics_key' => $this->account->analytics_key ?: '',
@ -383,7 +385,7 @@ info("get company");
$credits = [];
$export_credits = Invoice::where('account_id', $this->account->id)
->where('amount', '<', '0')
->where('balance', '<', '0')
->where('invoice_type_id', '=', INVOICE_TYPE_STANDARD)
->where('is_public', true)
->withTrashed()

View File