diff --git a/app/Library/Finances.php b/app/Library/Finances.php index ad15ddd77..aaf008502 100644 --- a/app/Library/Finances.php +++ b/app/Library/Finances.php @@ -33,7 +33,7 @@ class Finances { $monthWanted = $month; $untaxed = 0.00; //Get the journal entries from the database - $entries = DB::table('CorpJournals')->where(['corporation_id' => $corpId, 'created_at' => $monthWanted, 'ref_type' => 127])->get(); + $entries = DB::table('CorpJournals')->where(['corporation_id' => $corpId, 'created_at' => $monthWanted, 'ref_type' => 'reprocessing_tax'])->get(); foreach($entries as $entry) { $untaxed += $entry->tax; } @@ -50,7 +50,7 @@ class Finances { $monthWanted = $month; $untaxed = 0.00; //Get the journal entries from the database - $entries = DB::table('CorpJournals')->where(['corporation_id' => $corpId, 'created_at' => $monthWanted, 'ref_type' => 46])->get(); + $entries = DB::table('CorpJournals')->where(['corporation_id' => $corpId, 'created_at' => $monthWanted, 'ref_type' => 'brokers_fee'])->get(); foreach($entries as $entry) { $untaxed += $entry->tax; } @@ -100,7 +100,7 @@ class Finances { $journals = json_decode($journal->raw, true); //For each journal array, attempt to store in the database foreach($journals as $entry) { - if($entry['ref_type'] == 46 || $entry['ref_type'] == 127) { + if($entry['ref_type'] == 'brokers_fee' || $entry['ref_type'] == 'reprocessing_tax') { $this->PutWalletJournal($entry, $corpId, $divison); } } diff --git a/app/Library/SeatHelper.php b/app/Library/SeatHelper.php new file mode 100644 index 000000000..66e5bab90 --- /dev/null +++ b/app/Library/SeatHelper.php @@ -0,0 +1,30 @@ + [ + 'X-Token' => 'tTa59bxP4VzBAfZ3s1JJ2BkEj8mFixD0', + ], + ]); + $data = $guzzle->request('GET', 'https://seat.warpedintentions.com/api/v2/corporation/wallet-journal/{corporation_id}', [ + 'corporation_id' => $corporationId, + ]); + dd($data); + } +} + +?> \ No newline at end of file