updated finance helper along with some other helper functions to prepare for jump bridge statics and other statistics
This commit is contained in:
@@ -63,22 +63,11 @@ class CorpJournal extends Command
|
||||
//Get the corps with structures logged in the database
|
||||
$corps = DB::table('CorpStructures')->select('corporation_id')->groupBy('corporation_id')->get();
|
||||
foreach($corps as $corp) {
|
||||
$this->line('Retrieving Corporation Journals for ' . $corp->corporation_id);
|
||||
$charId = DB::table('CorpStructures')->select('character_id')->where(['corporation_id' => $corp->corporation_id])->first();
|
||||
$lastPage = $this->GetJournal($charId->character_id);
|
||||
$this->line('Last Page recorded was ' . $lastPage);
|
||||
$this->line('Received Corporation Journals for ' . $corp->corporation_id);
|
||||
$finance->GetWalletJournal(1, $charId);
|
||||
}
|
||||
|
||||
//Mark the job as finished
|
||||
$task->SetStopStatus();
|
||||
}
|
||||
|
||||
private function GetJournal($charId) {
|
||||
$finances = new FinanceHelper();
|
||||
//Get the master wallet journal for the corporation for the character
|
||||
$lastPage = $finances->GetWalletJournal(1, $charId);
|
||||
|
||||
return $lastPage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,17 +5,16 @@
|
||||
* GNU Public License
|
||||
*/
|
||||
|
||||
namespace App\Library\Finances;
|
||||
namespace App\Library\Finances\Helper;
|
||||
|
||||
use DB;
|
||||
|
||||
use App\Models\Esi\EsiScope;
|
||||
use App\Models\Esi\EsiToken;
|
||||
use App\Models\Corporation\CorpJournal;
|
||||
use App\Models\User\UserToCorporation;
|
||||
use App\Models\Finances\PlayerDonationJournal;
|
||||
|
||||
use App\Library\Esi;
|
||||
use App\Library\Finances\MarketTax;
|
||||
use App\Library\Finances\PlayerDonation;
|
||||
use App\Library\Finances\ReprocessingTax;
|
||||
|
||||
use Seat\Eseye\Cache\NullCache;
|
||||
use Seat\Eseye\Configuration;
|
||||
@@ -73,12 +72,19 @@ class FinanceHelper {
|
||||
//The PutWalletJournal function checks to see if it's already in the database.
|
||||
foreach($wallet as $entry) {
|
||||
if($entry['amount'] > 0) {
|
||||
if($entry['ref_type'] == 'brokers_fee' ||
|
||||
$entry['ref_type'] == 'reprocessing_tax' ||
|
||||
$entry['ref_type'] == 'jumpgate_fee' ||
|
||||
$entry['ref_type'] == 'player_donation' ||
|
||||
($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) {
|
||||
$this->PutWalletJournal($entry, $corpId, $division);
|
||||
if($entry['ref_type'] == 'brokers_fee') {
|
||||
$market = new MarketTax();
|
||||
$market->InsertMarketTax($entry, $corpId, $division);
|
||||
} else if($entry['ref_type'] == 'reprocessing_tax') {
|
||||
$reprocessing = new ReprocessingTax();
|
||||
$reprocessing->InsertReprocessingTax($entry, $corpId, $division);
|
||||
} else if($entry['ref_type'] == 'jumpgate_fee') {
|
||||
$jb = new JumpBridgeTax();
|
||||
$jb->InsertJumpBridgeTax($entry, $corpId, $division);
|
||||
} else if($entry['ref_type'] == 'player_donation' ||
|
||||
($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) {
|
||||
$other = new PlayerDonation();
|
||||
$other->InsertPlayerDonation($entry, $corpId, $division);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,8 +94,6 @@ class FinanceHelper {
|
||||
$currentPage++;
|
||||
//Continue looping through the do while loop until the current page is greater than or equal to the total pages.
|
||||
} while ($currentPage < $totalPages);
|
||||
|
||||
return $currentPage;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,92 +140,6 @@ class FinanceHelper {
|
||||
}
|
||||
}
|
||||
|
||||
private function PutWalletJournal($journal, $corpId, $division) {
|
||||
//Create ESI Helper class
|
||||
$esiHelper = new Esi;
|
||||
$date = $esiHelper->DecodeDate($journal['date']);
|
||||
|
||||
if($journal['ref_type'] == 'player_donation' || ($journal['ref_type'] == 'corporation_account_withdrawal' && $journal['second_party_id'] == 98287666)) {
|
||||
//if we don't find the journal entry, add the journal entry to the database
|
||||
if(!PlayerDonationJournal::where(['id' => $journal['id']])->exists()) {
|
||||
$entry = new PlayerDonationJournal;
|
||||
$entry->id = $journal['id'];
|
||||
$entry->corporation_id = $corpId;
|
||||
$entry->division = $division;
|
||||
if(isset($journal['amount'])) {
|
||||
$entry->amount = $journal['amount'];
|
||||
}
|
||||
if(isset($journal['balance'])) {
|
||||
$entry->balance = $journal['balance'];
|
||||
}
|
||||
if(isset($journal['context_id'])) {
|
||||
$entry->context_id = $journal['context_id'];
|
||||
}
|
||||
if(isset($journal['context_id_type'])) {
|
||||
$entry->context_id_type = $journal['context_id_type'];
|
||||
}
|
||||
$entry->date = $date;
|
||||
$entry->description = $journal['description'];
|
||||
if(isset($journal['first_party_id'])) {
|
||||
$entry->first_party_id = $journal['first_party_id'];
|
||||
}
|
||||
if(isset($journal['reason'])) {
|
||||
$entry->reason = $journal['reason'];
|
||||
}
|
||||
$entry->ref_type = $journal['ref_type'];
|
||||
if(isset($journal['second_party_id'])) {
|
||||
$entry->second_party_id = $journal['second_party_id'];
|
||||
}
|
||||
if(isset($journal['tax'])) {
|
||||
$entry->tax = $journal['tax'];
|
||||
}
|
||||
if(isset($journal['tax_receiver_id'])) {
|
||||
$entry->tax_receiver_id = $journal['tax_receiver_id'];
|
||||
}
|
||||
$entry->save();
|
||||
}
|
||||
} else {
|
||||
//if we don't find the journal entry, add the journal entry to the database
|
||||
if(!CorpJournal::where(['id' => $journal['id']])->exists()) {
|
||||
$entry = new CorpJournal;
|
||||
$entry->id = $journal['id'];
|
||||
$entry->corporation_id = $corpId;
|
||||
$entry->division = $division;
|
||||
if(isset($journal['amount'])) {
|
||||
$entry->amount = $journal['amount'];
|
||||
}
|
||||
if(isset($journal['balance'])) {
|
||||
$entry->balance = $journal['balance'];
|
||||
}
|
||||
if(isset($journal['context_id'])) {
|
||||
$entry->context_id = $journal['context_id'];
|
||||
}
|
||||
if(isset($journal['context_id_type'])) {
|
||||
$entry->context_id_type = $journal['context_id_type'];
|
||||
}
|
||||
$entry->date = $date;
|
||||
$entry->description = $journal['description'];
|
||||
if(isset($journal['first_party_id'])) {
|
||||
$entry->first_party_id = $journal['first_party_id'];
|
||||
}
|
||||
if(isset($journal['reason'])) {
|
||||
$entry->reason = $journal['reason'];
|
||||
}
|
||||
$entry->ref_type = $journal['ref_type'];
|
||||
if(isset($journal['second_party_id'])) {
|
||||
$entry->second_party_id = $journal['second_party_id'];
|
||||
}
|
||||
if(isset($journal['tax'])) {
|
||||
$entry->tax = $journal['tax'];
|
||||
}
|
||||
if(isset($journal['tax_receiver_id'])) {
|
||||
$entry->tax_receiver_id = $journal['tax_receiver_id'];
|
||||
}
|
||||
$entry->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
60
app/Library/Finances/JumpBridgeTax.php
Normal file
60
app/Library/Finances/JumpBridgeTax.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/** W4RP Services
|
||||
* GNU Public License
|
||||
*/
|
||||
|
||||
namespace App\Library\Finances;
|
||||
|
||||
use DB;
|
||||
|
||||
use App\Library\Esi;
|
||||
|
||||
use App\Models\Finances\JumpBridgeJournal;
|
||||
|
||||
class JumpBridgeTax {
|
||||
public function InsertJumpBridgeTax($journal, $corpId, $division) {
|
||||
//Create the ESI Helper class
|
||||
$esiHelper = new Esi;
|
||||
|
||||
//Check to see if we can find the entry in the database already.
|
||||
//If we don't then add it to the database
|
||||
if(!JumpBridgeJournal::where(['id' => $journal['id']])->exists()) {
|
||||
$entry = new JumpBridgeJournal;
|
||||
$entry->id = $journal['id'];
|
||||
$entry->corporation_id = $corpId;
|
||||
$entry->division = $division;
|
||||
if(isset($journal['amount'])) {
|
||||
$entry->amount = $journal['amount'];
|
||||
}
|
||||
if(isset($journal['balance'])) {
|
||||
$entry->balance = $journal['balance'];
|
||||
}
|
||||
if(isset($journal['context_id'])) {
|
||||
$entry->context_id = $journal['context_id'];
|
||||
}
|
||||
if(isset($journal['context_id_type'])) {
|
||||
$entry->context_id_type = $journal['context_id_type'];
|
||||
}
|
||||
$entry->date = $esiHelper->DecodeDate($journal['date']);
|
||||
$entry->description = $journal['description'];
|
||||
if(isset($journal['first_party_id'])) {
|
||||
$entry->first_party_id = $journal['first_party_id'];
|
||||
}
|
||||
if(isset($journal['reason'])) {
|
||||
$entry->reason = $journal['reason'];
|
||||
}
|
||||
$entry->ref_type = $journal['ref_type'];
|
||||
if(isset($journal['second_party_id'])) {
|
||||
$entry->second_party_id = $journal['second_party_id'];
|
||||
}
|
||||
if(isset($journal['tax'])) {
|
||||
$entry->tax = $journal['tax'];
|
||||
}
|
||||
if(isset($journal['tax_receiver_id'])) {
|
||||
$entry->tax_receiver_id = $journal['tax_receiver_id'];
|
||||
}
|
||||
$entry->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
63
app/Library/Finances/MarketTax.php
Normal file
63
app/Library/Finances/MarketTax.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* W4RP Services
|
||||
* GNU Public License
|
||||
*/
|
||||
|
||||
namespace App\Library\Finances;
|
||||
|
||||
use DB;
|
||||
|
||||
use App\Library\Esi;
|
||||
|
||||
use App\Models\Finances\CorpMarketJournal;
|
||||
|
||||
class MarketTax {
|
||||
public function InsertMarketTax($journal, $corpId, $division) {
|
||||
//Create the ESI Helper class
|
||||
$esiHelper = new Esi;
|
||||
|
||||
//Check to see if we can find the entry in the database already.
|
||||
//If we don't then add it to the database
|
||||
if(!CorpMarketJournal::where(['id' => $journal['id']])->exists()) {
|
||||
$entry = new CorpMarketJournal;
|
||||
$entry->id = $journal['id'];
|
||||
$entry->corporation_id = $corpId;
|
||||
$entry->division = $division;
|
||||
if(isset($journal['amount'])) {
|
||||
$entry->amount = $journal['amount'];
|
||||
}
|
||||
if(isset($journal['balance'])) {
|
||||
$entry->balance = $journal['balance'];
|
||||
}
|
||||
if(isset($journal['context_id'])) {
|
||||
$entry->context_id = $journal['context_id'];
|
||||
}
|
||||
if(isset($journal['context_id_type'])) {
|
||||
$entry->context_id_type = $journal['context_id_type'];
|
||||
}
|
||||
$entry->date = $esiHelper->DecodeDate($journal['date']);
|
||||
$entry->description = $journal['description'];
|
||||
if(isset($journal['first_party_id'])) {
|
||||
$entry->first_party_id = $journal['first_party_id'];
|
||||
}
|
||||
if(isset($journal['reason'])) {
|
||||
$entry->reason = $journal['reason'];
|
||||
}
|
||||
$entry->ref_type = $journal['ref_type'];
|
||||
if(isset($journal['second_party_id'])) {
|
||||
$entry->second_party_id = $journal['second_party_id'];
|
||||
}
|
||||
if(isset($journal['tax'])) {
|
||||
$entry->tax = $journal['tax'];
|
||||
}
|
||||
if(isset($journal['tax_receiver_id'])) {
|
||||
$entry->tax_receiver_id = $journal['tax_receiver_id'];
|
||||
}
|
||||
$entry->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
63
app/Library/Finances/PlayerDonation.php
Normal file
63
app/Library/Finances/PlayerDonation.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* W4RP Services
|
||||
* GNU Public License
|
||||
*/
|
||||
|
||||
namespace App\Library\Finances;
|
||||
|
||||
use DB;
|
||||
|
||||
use App\Library\Esi;
|
||||
|
||||
use App\Library\Models\PlayerDonationJournal;
|
||||
|
||||
class PlayerDonation {
|
||||
public function InsertPlayerDonation($journal, $corpId, $division) {
|
||||
//Create the ESI Helper class
|
||||
$esiHelper = new Esi;
|
||||
|
||||
//Check to see if we can find the entry in the database already.
|
||||
//If we don't then add it to the database
|
||||
if(!PlayerDonationJournal::where(['id' => $journal['id']])->exists()) {
|
||||
$entry = new PlayerDonationJournal;
|
||||
$entry->id = $journal['id'];
|
||||
$entry->corporation_id = $corpId;
|
||||
$entry->division = $division;
|
||||
if(isset($journal['amount'])) {
|
||||
$entry->amount = $journal['amount'];
|
||||
}
|
||||
if(isset($journal['balance'])) {
|
||||
$entry->balance = $journal['balance'];
|
||||
}
|
||||
if(isset($journal['context_id'])) {
|
||||
$entry->context_id = $journal['context_id'];
|
||||
}
|
||||
if(isset($journal['context_id_type'])) {
|
||||
$entry->context_id_type = $journal['context_id_type'];
|
||||
}
|
||||
$entry->date = $esiHelper->DecodeDate($journal['date']);
|
||||
$entry->description = $journal['description'];
|
||||
if(isset($journal['first_party_id'])) {
|
||||
$entry->first_party_id = $journal['first_party_id'];
|
||||
}
|
||||
if(isset($journal['reason'])) {
|
||||
$entry->reason = $journal['reason'];
|
||||
}
|
||||
$entry->ref_type = $journal['ref_type'];
|
||||
if(isset($journal['second_party_id'])) {
|
||||
$entry->second_party_id = $journal['second_party_id'];
|
||||
}
|
||||
if(isset($journal['tax'])) {
|
||||
$entry->tax = $journal['tax'];
|
||||
}
|
||||
if(isset($journal['tax_receiver_id'])) {
|
||||
$entry->tax_receiver_id = $journal['tax_receiver_id'];
|
||||
}
|
||||
$entry->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
62
app/Library/Finances/ReprocessingTax.php
Normal file
62
app/Library/Finances/ReprocessingTax.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* W4RP Services
|
||||
* GNU Public License
|
||||
*/
|
||||
|
||||
namespace App\Library\Finances;
|
||||
|
||||
use DB;
|
||||
use App\Library\Esi;
|
||||
|
||||
use App\Models\Finances\ReprocessingTaxJournal;
|
||||
|
||||
class ReprocessingTax {
|
||||
public function InsertReprocessingTax($journal, $corpId, $division) {
|
||||
//Create the ESI Helper class
|
||||
$esiHelper = new Esi;
|
||||
|
||||
//Check to see if we can find the entry in the database already.
|
||||
//If we don't then add it to the database
|
||||
if(!ReprocessingTaxJournal::where(['id' => $journal['id']])->exists()) {
|
||||
$entry = new ReprocessingTaxJournal;
|
||||
$entry->id = $journal['id'];
|
||||
$entry->corporation_id = $corpId;
|
||||
$entry->division = $division;
|
||||
if(isset($journal['amount'])) {
|
||||
$entry->amount = $journal['amount'];
|
||||
}
|
||||
if(isset($journal['balance'])) {
|
||||
$entry->balance = $journal['balance'];
|
||||
}
|
||||
if(isset($journal['context_id'])) {
|
||||
$entry->context_id = $journal['context_id'];
|
||||
}
|
||||
if(isset($journal['context_id_type'])) {
|
||||
$entry->context_id_type = $journal['context_id_type'];
|
||||
}
|
||||
$entry->date = $esiHelper->DecodeDate($journal['date']);
|
||||
$entry->description = $journal['description'];
|
||||
if(isset($journal['first_party_id'])) {
|
||||
$entry->first_party_id = $journal['first_party_id'];
|
||||
}
|
||||
if(isset($journal['reason'])) {
|
||||
$entry->reason = $journal['reason'];
|
||||
}
|
||||
$entry->ref_type = $journal['ref_type'];
|
||||
if(isset($journal['second_party_id'])) {
|
||||
$entry->second_party_id = $journal['second_party_id'];
|
||||
}
|
||||
if(isset($journal['tax'])) {
|
||||
$entry->tax = $journal['tax'];
|
||||
}
|
||||
if(isset($journal['tax_receiver_id'])) {
|
||||
$entry->tax_receiver_id = $journal['tax_receiver_id'];
|
||||
}
|
||||
$entry->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
41
app/Models/Finances/CorpMarketJournal.php
Normal file
41
app/Models/Finances/CorpMarketJournal.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Finances;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CorpMarketJournal extends Model
|
||||
{
|
||||
/**
|
||||
* Table Name
|
||||
*/
|
||||
protected $table = 'corp_market_journal';
|
||||
|
||||
/**
|
||||
* Timestamps
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'corporation_id',
|
||||
'division',
|
||||
'amount',
|
||||
'balance',
|
||||
'context_id',
|
||||
'context_id_type',
|
||||
'date',
|
||||
'description',
|
||||
'first_party_id',
|
||||
'reason',
|
||||
'ref_type',
|
||||
'second_party_id',
|
||||
'tax',
|
||||
'tax_receiver_id',
|
||||
];
|
||||
}
|
||||
41
app/Models/Finances/JumpBridgeJournal.php
Normal file
41
app/Models/Finances/JumpBridgeJournal.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Finances;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class JumpBridgeJournal extends Model
|
||||
{
|
||||
/**
|
||||
* Table Name
|
||||
*/
|
||||
protected $table = 'jump_bridge_journal';
|
||||
|
||||
/**
|
||||
* Timestamps
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'corporation_id',
|
||||
'division',
|
||||
'amount',
|
||||
'balance',
|
||||
'context_id',
|
||||
'context_id_type',
|
||||
'date',
|
||||
'description',
|
||||
'first_party_id',
|
||||
'reason',
|
||||
'ref_type',
|
||||
'second_party_id',
|
||||
'tax',
|
||||
'tax_receiver_id',
|
||||
];
|
||||
}
|
||||
@@ -9,7 +9,7 @@ class PlayerDonationJournal extends Model
|
||||
/**
|
||||
* Table Name
|
||||
*/
|
||||
protected $table = 'PlayerDonationJournals';
|
||||
protected $table = 'player_donation_journal';
|
||||
|
||||
/**
|
||||
* Timestamps
|
||||
|
||||
41
app/Models/Finances/ReprocessingTaxJournal.php
Normal file
41
app/Models/Finances/ReprocessingTaxJournal.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Finances;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ReprocessingTaxJournal extends Model
|
||||
{
|
||||
/**
|
||||
* Table Name
|
||||
*/
|
||||
protected $table = 'reprocessing_tax_journal';
|
||||
|
||||
/**
|
||||
* Timestamps
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'corporation_id',
|
||||
'division',
|
||||
'amount',
|
||||
'balance',
|
||||
'context_id',
|
||||
'context_id_type',
|
||||
'date',
|
||||
'description',
|
||||
'first_party_id',
|
||||
'reason',
|
||||
'ref_type',
|
||||
'second_party_id',
|
||||
'tax',
|
||||
'tax_receiver_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateJumpBridgeJournal extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if(!Schema::hasTable('jump_bridge_journal')) {
|
||||
Schema::create('jump_bridge_journal', function(Blueprint $table) {
|
||||
$table->string('id')->unique();
|
||||
$table->integer('corporation_id')->nullabe();
|
||||
$table->integer('division')->default(0);
|
||||
$table->decimal('amount', 20, 2)->nullable();
|
||||
$table->decimal('balance', 20, 2)->nullable();
|
||||
$table->integer('context_id')->nullable();
|
||||
$table->string('context_id_type')->nullable();
|
||||
$table->dateTime('date')->nullabe();
|
||||
$table->string('description')->nullabe();
|
||||
$table->integer('first_party_id')->nullable();
|
||||
$table->string('reason')->default(' ');
|
||||
$table->string('ref_type')->nullabe();
|
||||
$table->integer('second_party_id')->nullable();
|
||||
$table->decimal('tax', 20, 2)->default(0.00);
|
||||
$table->integer('tax_receiver_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jump_bridge_journal');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCorpMarketJournal extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if(!Schema::hasTable('corp_market_journal')) {
|
||||
Schema::create('corp_market_journal', function(Blueprint $table) {
|
||||
$table->string('id')->unique();
|
||||
$table->integer('corporation_id')->nullabe();
|
||||
$table->integer('division')->default(0);
|
||||
$table->decimal('amount', 20, 2)->nullable();
|
||||
$table->decimal('balance', 20, 2)->nullable();
|
||||
$table->integer('context_id')->nullable();
|
||||
$table->string('context_id_type')->nullable();
|
||||
$table->dateTime('date')->nullabe();
|
||||
$table->string('description')->nullabe();
|
||||
$table->integer('first_party_id')->nullable();
|
||||
$table->string('reason')->default(' ');
|
||||
$table->string('ref_type')->nullabe();
|
||||
$table->integer('second_party_id')->nullable();
|
||||
$table->decimal('tax', 20, 2)->default(0.00);
|
||||
$table->integer('tax_receiver_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('corp_market_journal');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePlayerDonationJournal extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if(!Schema::hasTable('player_donation_journal')) {
|
||||
Schema::create('player_donation_journal', function(Blueprint $table) {
|
||||
$table->string('id')->unique();
|
||||
$table->integer('corporation_id')->nullabe();
|
||||
$table->integer('division')->default(0);
|
||||
$table->decimal('amount', 20, 2)->nullable();
|
||||
$table->decimal('balance', 20, 2)->nullable();
|
||||
$table->integer('context_id')->nullable();
|
||||
$table->string('context_id_type')->nullable();
|
||||
$table->dateTime('date')->nullabe();
|
||||
$table->string('description')->nullabe();
|
||||
$table->integer('first_party_id')->nullable();
|
||||
$table->string('reason')->default(' ');
|
||||
$table->string('ref_type')->nullabe();
|
||||
$table->integer('second_party_id')->nullable();
|
||||
$table->decimal('tax', 20, 2)->default(0.00);
|
||||
$table->integer('tax_receiver_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('player_donation_journal');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateReprocessingTaxJournal extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if(!Schema::hasTable('reprocessing_tax_journal')) {
|
||||
Schema::create('reprocessing_tax_journal', function(Blueprint $table) {
|
||||
$table->string('id')->unique();
|
||||
$table->integer('corporation_id')->nullabe();
|
||||
$table->integer('division')->default(0);
|
||||
$table->decimal('amount', 20, 2)->nullable();
|
||||
$table->decimal('balance', 20, 2)->nullable();
|
||||
$table->integer('context_id')->nullable();
|
||||
$table->string('context_id_type')->nullable();
|
||||
$table->dateTime('date')->nullabe();
|
||||
$table->string('description')->nullabe();
|
||||
$table->integer('first_party_id')->nullable();
|
||||
$table->string('reason')->default(' ');
|
||||
$table->string('ref_type')->nullabe();
|
||||
$table->integer('second_party_id')->nullable();
|
||||
$table->decimal('tax', 20, 2)->default(0.00);
|
||||
$table->integer('tax_receiver_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('reprocessing_tax_journal');
|
||||
}
|
||||
}
|
||||
18
vendor/composer/autoload_classmap.php
vendored
18
vendor/composer/autoload_classmap.php
vendored
@@ -6,12 +6,12 @@ $vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'App\\Console\\Commands\\CalculateMarketTax' => $baseDir . '/app/Console/Commands/CalculateMarketTax.php',
|
||||
'App\\Console\\Commands\\CorpJournal' => $baseDir . '/app/Console/Commands/CorpJournal.php',
|
||||
'App\\Console\\Commands\\DumpFleets' => $baseDir . '/app/Console/Commands/DumpFleets.php',
|
||||
'App\\Console\\Commands\\GetCorps' => $baseDir . '/app/Console/Commands/GetCorps.php',
|
||||
'App\\Console\\Commands\\GetLogisticsContracts' => $baseDir . '/app/Console/Commands/GetLogisticContracts.php',
|
||||
'App\\Console\\Commands\\SendMail' => $baseDir . '/app/Console/Commands/SendMail.php',
|
||||
'App\\Console\\Commands\\CalculateMarketTax' => $baseDir . '/app/Console/Commands/calculatemarkettax.php',
|
||||
'App\\Console\\Commands\\CorpJournal' => $baseDir . '/app/Console/Commands/corpJournal.php',
|
||||
'App\\Console\\Commands\\DumpFleets' => $baseDir . '/app/Console/Commands/dumpFleets.php',
|
||||
'App\\Console\\Commands\\GetCorps' => $baseDir . '/app/Console/Commands/getCorps.php',
|
||||
'App\\Console\\Commands\\GetLogisticsContracts' => $baseDir . '/app/Console/Commands/getLogisticContracts.php',
|
||||
'App\\Console\\Commands\\SendMail' => $baseDir . '/app/Console/Commands/sendmail.php',
|
||||
'App\\Console\\Commands\\UpdateMoonPricing' => $baseDir . '/app/Console/Commands/UpdateMoonPricing.php',
|
||||
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
|
||||
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
|
||||
@@ -46,11 +46,17 @@ return array(
|
||||
'App\\Http\\Middleware\\TrustProxies' => $baseDir . '/app/Http/Middleware/TrustProxies.php',
|
||||
'App\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/app/Http/Middleware/VerifyCsrfToken.php',
|
||||
'App\\Library\\Esi' => $baseDir . '/app/Library/Esi.php',
|
||||
'App\\Library\\Esi\\Esi' => $baseDir . '/app/Library/Esi/Esi.php',
|
||||
'App\\Library\\Esi\\Mail' => $baseDir . '/app/Library/Esi/Mail.php',
|
||||
'App\\Library\\FinanceHelper' => $baseDir . '/app/Library/FinanceHelper.php',
|
||||
'App\\Library\\Finances\\FinanceHelper' => $baseDir . '/app/Library/Finances/FinanceHelper.php',
|
||||
'App\\Library\\FleetHelper' => $baseDir . '/app/Library/FleetHelper.php',
|
||||
'App\\Library\\Fleets\\FleetHelper' => $baseDir . '/app/Library/Fleets/FleetHelper.php',
|
||||
'App\\Library\\Mail' => $baseDir . '/app/Library/Mail.php',
|
||||
'App\\Library\\MoonCalc' => $baseDir . '/app/Library/MoonCalc.php',
|
||||
'App\\Library\\MoonMine' => $baseDir . '/app/Library/MoonMine.php',
|
||||
'App\\Library\\Moons\\MoonCalc' => $baseDir . '/app/Library/Moons/MoonCalc.php',
|
||||
'App\\Library\\Moons\\MoonMine' => $baseDir . '/app/Library/Moons/MoonMine.php',
|
||||
'App\\Library\\SeatHelper' => $baseDir . '/app/Library/SeatHelper.php',
|
||||
'App\\Library\\Structures\\StructureTaxHelper' => $baseDir . '/app/Library/Structures/StructureTaxHelper.php',
|
||||
'App\\Models\\Config' => $baseDir . '/app/Models/Config.php',
|
||||
|
||||
18
vendor/composer/autoload_static.php
vendored
18
vendor/composer/autoload_static.php
vendored
@@ -455,12 +455,12 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'App\\Console\\Commands\\CalculateMarketTax' => __DIR__ . '/../..' . '/app/Console/Commands/CalculateMarketTax.php',
|
||||
'App\\Console\\Commands\\CorpJournal' => __DIR__ . '/../..' . '/app/Console/Commands/CorpJournal.php',
|
||||
'App\\Console\\Commands\\DumpFleets' => __DIR__ . '/../..' . '/app/Console/Commands/DumpFleets.php',
|
||||
'App\\Console\\Commands\\GetCorps' => __DIR__ . '/../..' . '/app/Console/Commands/GetCorps.php',
|
||||
'App\\Console\\Commands\\GetLogisticsContracts' => __DIR__ . '/../..' . '/app/Console/Commands/GetLogisticContracts.php',
|
||||
'App\\Console\\Commands\\SendMail' => __DIR__ . '/../..' . '/app/Console/Commands/SendMail.php',
|
||||
'App\\Console\\Commands\\CalculateMarketTax' => __DIR__ . '/../..' . '/app/Console/Commands/calculatemarkettax.php',
|
||||
'App\\Console\\Commands\\CorpJournal' => __DIR__ . '/../..' . '/app/Console/Commands/corpJournal.php',
|
||||
'App\\Console\\Commands\\DumpFleets' => __DIR__ . '/../..' . '/app/Console/Commands/dumpFleets.php',
|
||||
'App\\Console\\Commands\\GetCorps' => __DIR__ . '/../..' . '/app/Console/Commands/getCorps.php',
|
||||
'App\\Console\\Commands\\GetLogisticsContracts' => __DIR__ . '/../..' . '/app/Console/Commands/getLogisticContracts.php',
|
||||
'App\\Console\\Commands\\SendMail' => __DIR__ . '/../..' . '/app/Console/Commands/sendmail.php',
|
||||
'App\\Console\\Commands\\UpdateMoonPricing' => __DIR__ . '/../..' . '/app/Console/Commands/UpdateMoonPricing.php',
|
||||
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
|
||||
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
|
||||
@@ -495,11 +495,17 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'App\\Http\\Middleware\\TrustProxies' => __DIR__ . '/../..' . '/app/Http/Middleware/TrustProxies.php',
|
||||
'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php',
|
||||
'App\\Library\\Esi' => __DIR__ . '/../..' . '/app/Library/Esi.php',
|
||||
'App\\Library\\Esi\\Esi' => __DIR__ . '/../..' . '/app/Library/Esi/Esi.php',
|
||||
'App\\Library\\Esi\\Mail' => __DIR__ . '/../..' . '/app/Library/Esi/Mail.php',
|
||||
'App\\Library\\FinanceHelper' => __DIR__ . '/../..' . '/app/Library/FinanceHelper.php',
|
||||
'App\\Library\\Finances\\FinanceHelper' => __DIR__ . '/../..' . '/app/Library/Finances/FinanceHelper.php',
|
||||
'App\\Library\\FleetHelper' => __DIR__ . '/../..' . '/app/Library/FleetHelper.php',
|
||||
'App\\Library\\Fleets\\FleetHelper' => __DIR__ . '/../..' . '/app/Library/Fleets/FleetHelper.php',
|
||||
'App\\Library\\Mail' => __DIR__ . '/../..' . '/app/Library/Mail.php',
|
||||
'App\\Library\\MoonCalc' => __DIR__ . '/../..' . '/app/Library/MoonCalc.php',
|
||||
'App\\Library\\MoonMine' => __DIR__ . '/../..' . '/app/Library/MoonMine.php',
|
||||
'App\\Library\\Moons\\MoonCalc' => __DIR__ . '/../..' . '/app/Library/Moons/MoonCalc.php',
|
||||
'App\\Library\\Moons\\MoonMine' => __DIR__ . '/../..' . '/app/Library/Moons/MoonMine.php',
|
||||
'App\\Library\\SeatHelper' => __DIR__ . '/../..' . '/app/Library/SeatHelper.php',
|
||||
'App\\Library\\Structures\\StructureTaxHelper' => __DIR__ . '/../..' . '/app/Library/Structures/StructureTaxHelper.php',
|
||||
'App\\Models\\Config' => __DIR__ . '/../..' . '/app/Models/Config.php',
|
||||
|
||||
Reference in New Issue
Block a user