diff --git a/app/Console/Commands/corpJournal.php b/app/Console/Commands/corpJournal.php index 5043999c5..0cbb0957e 100644 --- a/app/Console/Commands/corpJournal.php +++ b/app/Console/Commands/corpJournal.php @@ -43,6 +43,8 @@ class corpJournal extends Command { //Setup the Finances Container $finance = new Finances(); + //Get the corps with structures logged in the database + //Get the characters that have the esi-wallet.read_corporation_wallets.v1 //esi wallet scope $characters = DB::table('EsiScopes')->where('scopes', 'esi-wallet.read_corporation_wallets.v1')->get(); diff --git a/app/Http/Controllers/FinancesController.php b/app/Http/Controllers/FinancesController.php index 0f7c0c4c4..06d709878 100644 --- a/app/Http/Controllers/FinancesController.php +++ b/app/Http/Controllers/FinancesController.php @@ -31,7 +31,8 @@ class FinancesController extends Controller public function displayWallet() { $helper = new Finances(); - $data = $helper->GetWalletJournal(1, 92626011); + $helper->GetWalletJournal(1, 92626011); + dd($helper); } public function displayTaxes() { diff --git a/app/Http/Controllers/RegisterStructure.php b/app/Http/Controllers/RegisterStructure.php index 68a6b9aff..44a643450 100644 --- a/app/Http/Controllers/RegisterStructure.php +++ b/app/Http/Controllers/RegisterStructure.php @@ -30,6 +30,7 @@ class RegisterStructure extends Controller ]); $structure = new CorpStructure(); + $structure->character_id = Auth::user()->character_id; $structure->corporation_id = $request->corporation_id; $structure->corporation_name = $request->corporation_name; $structure->region = $request->region; diff --git a/app/Library/Finances.php b/app/Library/Finances.php index 6566c7dcf..9af4711be 100644 --- a/app/Library/Finances.php +++ b/app/Library/Finances.php @@ -101,8 +101,6 @@ class Finances { //For each journal array, attempt to store in the database foreach($journals as $entry) { if($entry['ref_type'] == 'brokers_fee' || $entry['ref_type'] == 'reprocessing_tax') { - printf("Found Entry"); - dd($entry); $this->PutWalletJournal($entry, $corpId, $divison); } } diff --git a/app/Models/CorpStructure.php b/app/Models/CorpStructure.php index 1903fd6e3..754ba8226 100644 --- a/app/Models/CorpStructure.php +++ b/app/Models/CorpStructure.php @@ -22,6 +22,7 @@ class CorpStructure extends Model * @var array */ protected $fillable = [ + 'character_id', 'corporation_id', 'corporation_name', 'region', diff --git a/database/migrations/2018_11_19_053751_create_corp_structures.php b/database/migrations/2018_11_19_053751_create_corp_structures.php index 3ab44889f..defc8151b 100644 --- a/database/migrations/2018_11_19_053751_create_corp_structures.php +++ b/database/migrations/2018_11_19_053751_create_corp_structures.php @@ -16,6 +16,7 @@ class CreateCorpStructure extends Migration if(!Schema::hasTable('CorpStructures')) { Schema::create('CorpStructures', function(Blueprint $table) { $table->increments('id'); + $table->integer('character_id'); $table->integer('corporation_id'); $table->string('corporation_name'); $table->string('region');