mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
Fix test data.
This commit is contained in:
@@ -364,6 +364,10 @@ class TestDataSeeder extends Seeder
|
|||||||
protected function createIncome($description, Carbon $date, $amount)
|
protected function createIncome($description, Carbon $date, $amount)
|
||||||
{
|
{
|
||||||
$date = new Carbon($date->format('Y-m') . '-23'); // paid on 23rd.
|
$date = new Carbon($date->format('Y-m') . '-23'); // paid on 23rd.
|
||||||
|
$today = new Carbon;
|
||||||
|
if ($date >= $today) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$toAccount = $this->findAccount('MyBank Checking Account');
|
$toAccount = $this->findAccount('MyBank Checking Account');
|
||||||
$fromAccount = $this->findAccount('Job');
|
$fromAccount = $this->findAccount('Job');
|
||||||
$category = Category::firstOrCreateEncrypted(['name' => 'Salary', 'user_id' => $this->user->id]);
|
$category = Category::firstOrCreateEncrypted(['name' => 'Salary', 'user_id' => $this->user->id]);
|
||||||
|
Reference in New Issue
Block a user