diff --git a/app/Console/Commands/Finances/HoldingFinances.php b/app/Console/Commands/Finances/HoldingFinances.php index b3b41ad33..c81bc9c09 100644 --- a/app/Console/Commands/Finances/HoldingFinances.php +++ b/app/Console/Commands/Finances/HoldingFinances.php @@ -73,7 +73,6 @@ class HoldingFinancesCommand extends Command //Get the total pages for the journal for the sov bills from the holding corporation $pages = $finance->GetJournalPageCount(6, $config['primary']); - dd($pages); //Dispatch a job for each page to process for($i = 1; $i <= $pages; $i++) { diff --git a/app/Console/Commands/Finances/SovBills.php b/app/Console/Commands/Finances/SovBills.php new file mode 100644 index 000000000..02fdfdf26 --- /dev/null +++ b/app/Console/Commands/Finances/SovBills.php @@ -0,0 +1,83 @@ +SetStartStatus(); + + //Setup the Finances container + $finance = new FinanceHelper(); + + //Get the esi configuration + $config = config('esi'); + + //Get the total pages for the journal for the sov bills from the holding corporation + $pages = $finance->GetJournalPageCount(6, $config['primary']); + + //Dispatch a job for each page to process + //for($i = 1; $i <= $pages; $i++) { + // $job = new JobProcessWalletJournal; + // $job->division = 6; + // $job->charId = $config['primary']; + // $job->page = $i; + // ProcessWalletJournalJob::dispatch($job)->onQueue('journal'); + //} + + //Try to figure it out from the command itself. + for($i = 1; $i <= $pages; $i++) { + printf("Getting page: " . $i . "\n"); + $finance->GetWalletJournalPage(6, $config['primary'], $i); + } + + //Mark the job as finished + $task->SetStopStatus(); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 252f9c462..9839b7f53 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -27,6 +27,7 @@ class Kernel extends ConsoleKernel Commands\FlexStructureCommand::class, Commands\EmptyJumpBridges::class, Commands\PurgeWormholes::class, + Commands\SovBillsCommand::class, ]; /**