wallet entries

This commit is contained in:
2021-02-15 18:52:35 +09:00
parent ae37aa5856
commit f66604ba6a

View File

@@ -96,6 +96,7 @@ class FinanceHelper {
dd($wallet);
//Foreach journal entry, add the journal entry to the table
foreach($wallet as $entry) {
/*
//See if we find the entry id in the database already
$found = AllianceWalletJournal::where([
'id' => $entry['id'],
@@ -137,21 +138,22 @@ class FinanceHelper {
}
}
*/
AllianceWalletJournal::insertOrIgnore([
'id' => $entry['id'],
'id' => $entry->id,
'corporation_id' => $corpId,
'divison' => $division,
'amount' => $entry['amount'],
'balance' => $entry['balance'],
'context_id' => $entry['context_id'],
'date' => $esi->DecodeDate($entry['date']),
'description' => $entry['description'],
'first_party_id' => $entry['first_party_id'],
'reason' => $entry['reason'],
'ref_type' => $entry['ref_type'],
'tax' => $entry['tax'],
'tax_receiver_id' => $entry['tax_receiver_id'],
'amount' => $entry->amount,
'balance' => $entry->balance,
'context_id' => $entry->context_id,
'date' => $esi->DecodeDate($entry->date),
'description' => $entry->description,
'first_party_id' => $entry->first_party_id,
'reason' => $entry->reason,
'ref_type' => $entry->ref_type,
'tax' => $entry->tax,
'tax_receiver_id' => $entry->tax_receiver_id,
]);
}
} else {