sov wallet journal
This commit is contained in:
@@ -14,6 +14,14 @@ use App\Library\Esi\Esi;
|
|||||||
use App\Models\Finances\AllianceMarketJournal;
|
use App\Models\Finances\AllianceMarketJournal;
|
||||||
|
|
||||||
class AllianceMarketTax {
|
class AllianceMarketTax {
|
||||||
|
public function EntryExists($journal) {
|
||||||
|
if(AllianceMarketJournal::where(['id' => $journal['id']])->exists()) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function InsertMarketTax($journal, $corpId, $division) {
|
public function InsertMarketTax($journal, $corpId, $division) {
|
||||||
//Create the ESI Helper class
|
//Create the ESI Helper class
|
||||||
$esiHelper = new Esi;
|
$esiHelper = new Esi;
|
||||||
|
|||||||
@@ -268,25 +268,23 @@ class FinanceHelper {
|
|||||||
//For each journal entry, attempt to store it in the database.
|
//For each journal entry, attempt to store it in the database.
|
||||||
//The PutWalletJournal function checks to see if it's already in the database.
|
//The PutWalletJournal function checks to see if it's already in the database.
|
||||||
foreach($wallet as $entry) {
|
foreach($wallet as $entry) {
|
||||||
if($entry['amount'] > 0) {
|
if($entry['ref_type'] == 'brokers_fee') {
|
||||||
if($entry['ref_type'] == 'brokers_fee') {
|
$market->InsertMarketTax($entry, $corpId, $division);
|
||||||
$market->InsertMarketTax($entry, $corpId, $division);
|
} else if($entry['ref_type'] == 'reprocessing_tax') {
|
||||||
} else if($entry['ref_type'] == 'reprocessing_tax') {
|
$reprocessing->InsertReprocessingTax($entry, $corpId, $division);
|
||||||
$reprocessing->InsertReprocessingTax($entry, $corpId, $division);
|
} else if($entry['ref_type'] == 'structure_gate_jump') {
|
||||||
} else if($entry['ref_type'] == 'structure_gate_jump') {
|
$jb->InsertJumpBridgeTax($entry, $corpId, $division);
|
||||||
$jb->InsertJumpBridgeTax($entry, $corpId, $division);
|
} else if($entry['ref_type'] == 'player_donation' ||
|
||||||
} else if($entry['ref_type'] == 'player_donation' ||
|
($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) {
|
||||||
($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) {
|
$other->InsertPlayerDonation($entry, $corpId, $division);
|
||||||
$other->InsertPlayerDonation($entry, $corpId, $division);
|
} else if($entry['ref_type'] == 'industry_job_tax' && $entry['second_party_id'] == 98287666) {
|
||||||
} else if($entry['ref_type'] == 'industry_job_tax' && $entry['second_party_id'] == 98287666) {
|
$industry->InsertStructureIndustryTax($entry, $corpId, $division);
|
||||||
$industry->InsertStructureIndustryTax($entry, $corpId, $division);
|
} else if($entry['ref_type'] == 'office_rental_fee' && $entry['second_party_id'] == 98287666) {
|
||||||
} else if($entry['ref_type'] == 'office_rental_fee' && $entry['second_party_id'] == 98287666) {
|
$office->InsertOfficeFee($entry, $corpId, $division);
|
||||||
$office->InsertOfficeFee($entry, $corpId, $division);
|
} else if($entry['ref_type'] == 'planetary_export_tax' || $entry['ref_type'] == 'planetary_import_tax') {
|
||||||
} else if($entry['ref_type'] == 'planetary_export_tax' || $entry['ref_type'] == 'planetary_import_tax') {
|
$pi->InsertPlanetProductionTax($entry, $corpId, $division);
|
||||||
$pi->InsertPlanetProductionTax($entry, $corpId, $division);
|
} else if($entry['ref_type'] == 'infrastructure_hub_maintenance' && $entry['first_party_id'] == 98287666) {
|
||||||
} else if($entry['ref_type'] == 'infrastructure_hub_maintenance' && $entry['first_party_id'] == 98287666) {
|
$sovBill->InsertSovBillExpense($entry, $corpId, $division);
|
||||||
$sovBill->InsertSovBillExpense($entry, $corpId, $division);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user