finance helper model update

This commit is contained in:
2018-12-13 01:53:06 -06:00
parent bb41eb5d8e
commit 15366a460a
3 changed files with 4 additions and 2 deletions

View File

@@ -140,7 +140,7 @@ class FinanceHelper {
if($journal['ref_type'] == 'player_donation') {
//if we don't find the journal entry, add the journal entry to the database
if(!PlayerDonationJournal::where('id', $journal['id'])->exists()) {
if(!PlayerDonationJournal::where(['id' => $journal['id']])->exists()) {
$entry = new CorpJournal;
$entry->id = $journal['id'];
$entry->corporation_id = $corpId;
@@ -179,7 +179,7 @@ class FinanceHelper {
}
} else {
//if we don't find the journal entry, add the journal entry to the database
if(!CorpJournal::where('id', $journal['id'])->exists()) {
if(!CorpJournal::where(['id' => $journal['id']])->exists()) {
$entry = new CorpJournal;
$entry->id = $journal['id'];
$entry->corporation_id = $corpId;

View File

@@ -22,6 +22,7 @@ class CorpJournal extends Model
* @var array
*/
protected $fillable = [
'id',
'corporation_id',
'division',
'amount',

View File

@@ -22,6 +22,7 @@ class PlayerDonationJournal extends Model
* @var array
*/
protected $fillable = [
'id',
'corporation_id',
'division',
'amount',