mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 13:41:09 -04:00 
			
		
		
		
	v5.0.0 update
This commit is contained in:
		| @ -52,7 +52,7 @@ class CreateTemplateCommand extends Command | ||||
|         } | ||||
|  | ||||
|         Storage::disk('views')->copy("/app/pdf/{$type}/{$type}1.blade.php", "/app/pdf/{$type}/{$templateName}.blade.php"); | ||||
|         copy(public_path("/assets/img/PDF/{$type}1.png"), public_path("/assets/img/PDF/{$templateName}.png")); | ||||
|         copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png")); | ||||
|  | ||||
|         $path = resource_path("app/pdf/{$type}/{$templateName}.blade.php"); | ||||
|         $type = ucfirst($type); | ||||
|  | ||||
| @ -2,6 +2,7 @@ | ||||
|  | ||||
| namespace Crater\Console; | ||||
|  | ||||
| use Crater\Models\RecurringInvoice; | ||||
| use Illuminate\Console\Scheduling\Schedule; | ||||
| use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||||
|  | ||||
| @ -31,6 +32,13 @@ class Kernel extends ConsoleKernel | ||||
|  | ||||
|         $schedule->command('check:estimates:status') | ||||
|             ->daily(); | ||||
|  | ||||
|         $recurringInvoices = RecurringInvoice::where('status', 'ACTIVE')->get(); | ||||
|         foreach ($recurringInvoices as $recurringInvoice) { | ||||
|             $schedule->call(function () use ($recurringInvoice) { | ||||
|                 $recurringInvoice->generateInvoice(); | ||||
|             })->cron($recurringInvoice->frequency); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|  | ||||
		Reference in New Issue
	
	Block a user