mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:04:35 -04:00
Fixes for backup script
This commit is contained in:
parent
af36e7c45d
commit
9ab15426eb
@ -80,9 +80,19 @@ class BackupUpdate extends Command
|
|||||||
Backup::whereRaw('html_backup IS NOT NULL')->chunk(5000, function ($backups) {
|
Backup::whereRaw('html_backup IS NOT NULL')->chunk(5000, function ($backups) {
|
||||||
foreach ($backups as $backup) {
|
foreach ($backups as $backup) {
|
||||||
|
|
||||||
if(strlen($backup->html_backup) > 1 && $backup->activity->client()->exists()){
|
if(strlen($backup->html_backup) > 1 && $backup->activity->invoice->exists()){
|
||||||
|
|
||||||
$client = $backup->activity->client;
|
$client = $backup->activity->invoice->client;
|
||||||
|
$backup->storeRemotely($backup->html_backup, $client);
|
||||||
|
|
||||||
|
}else if(strlen($backup->html_backup) > 1 && $backup->activity->quote->exists()){
|
||||||
|
|
||||||
|
$client = $backup->activity->quote->client;
|
||||||
|
$backup->storeRemotely($backup->html_backup, $client);
|
||||||
|
|
||||||
|
}else if(strlen($backup->html_backup) > 1 && $backup->activity->credit->exists()){
|
||||||
|
|
||||||
|
$client = $backup->activity->credit->client;
|
||||||
$backup->storeRemotely($backup->html_backup, $client);
|
$backup->storeRemotely($backup->html_backup, $client);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user