diff --git a/app/Library/Taxes/TaxesHelper.php b/app/Library/Taxes/TaxesHelper.php index 6291b1595..cd4e7b0af 100644 --- a/app/Library/Taxes/TaxesHelper.php +++ b/app/Library/Taxes/TaxesHelper.php @@ -101,7 +101,7 @@ class TaxesHelper { public function GetPiSalesGross($start, $end) { $revenue = 0.00; - $grosses = PISaleJournal::whereBetween('date', [$start, $end]); + $grosses = PISaleJournal::whereBetween('date', [$start, $end])->get()->toArray(); foreach($grosses as $gross) { $revenue += ($gross['quantity'] * $gross['unit_price']); diff --git a/app/Models/Finances/PISaleJournal.php b/app/Models/Finances/PISaleJournal.php index 770f96632..bcd9f9e4f 100644 --- a/app/Models/Finances/PISaleJournal.php +++ b/app/Models/Finances/PISaleJournal.php @@ -22,8 +22,6 @@ class PISaleJournal extends Model * @var array */ protected $fillable = [ - 'id', - 'corp_id', 'division', 'client_id', 'date', diff --git a/app/Models/Finances/PlanetProductionTaxJournal.php b/app/Models/Finances/PlanetProductionTaxJournal.php index d3720c61f..d2708f97f 100644 --- a/app/Models/Finances/PlanetProductionTaxJournal.php +++ b/app/Models/Finances/PlanetProductionTaxJournal.php @@ -22,6 +22,9 @@ class PlanetProductionTaxJournal extends Model * @var array */ protected $fillable = [ + 'id', + 'corporation_id', + 'division', 'amount', 'balance', 'context_id',