Complete API for recurring transactions.

This commit is contained in:
James Cole
2018-06-30 06:14:39 +02:00
parent b8893bcad7
commit 0509e54a95
8 changed files with 98 additions and 47 deletions

View File

@@ -73,7 +73,7 @@ class RecurrenceTransaction extends Model
*/
public function destinationAccount(): BelongsTo
{
return $this->belongsTo(Account::class);
return $this->belongsTo(Account::class,'destination_id');
}
/**
@@ -109,7 +109,7 @@ class RecurrenceTransaction extends Model
*/
public function sourceAccount(): BelongsTo
{
return $this->belongsTo(Account::class);
return $this->belongsTo(Account::class,'source_id');
}
/**

View File

@@ -32,6 +32,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Collection;
use Log;
use Preferences;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -42,6 +43,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property User $user
* @property int $bill_id
* @property Collection $categories
* @property bool $completed
*/
class TransactionJournal extends Model
{