diff --git a/app/Console/Commands/SendRemindersCron.php b/app/Console/Commands/SendRemindersCron.php index ad0b99387..0e0550d9e 100644 --- a/app/Console/Commands/SendRemindersCron.php +++ b/app/Console/Commands/SendRemindersCron.php @@ -26,6 +26,7 @@ use App\Utils\Traits\MakesReminders; use Illuminate\Console\Command; use Illuminate\Support\Facades\App; +//@deprecated 27-11-2022 - only ever should be used for testing class SendRemindersCron extends Command { use MakesReminders, MakesDates; diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index b81b4a476..c9df6ee84 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -428,13 +428,13 @@ class InvoiceController extends BaseController event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); - $transaction = [ - 'invoice' => $invoice->transaction_event(), - 'payment' => [], - 'client' => $invoice->client->transaction_event(), - 'credit' => [], - 'metadata' => [], - ]; + // $transaction = [ + // 'invoice' => $invoice->transaction_event(), + // 'payment' => [], + // 'client' => $invoice->client->transaction_event(), + // 'credit' => [], + // 'metadata' => [], + // ]; // TransactionLog::dispatch(TransactionEvent::INVOICE_UPDATED, $transaction, $invoice->company->db); diff --git a/app/Jobs/Company/CompanyExport.php b/app/Jobs/Company/CompanyExport.php index f523c91b3..5da3430b6 100644 --- a/app/Jobs/Company/CompanyExport.php +++ b/app/Jobs/Company/CompanyExport.php @@ -36,6 +36,8 @@ use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Storage; +use function Amp\call; + class CompanyExport implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, MakesHash; @@ -531,6 +533,15 @@ class CompanyExport implements ShouldQueue $path = 'backups'; + Storage::makeDirectory(public_path('storage/backups/')); + + try { + mkdir(public_path('storage/backups/')); + } + catch(\Exception $e) { + nlog("could not create directory"); + } + $zip_path = public_path('storage/backups/'.$file_name); $zip = new \ZipArchive();