form stuff done

This commit is contained in:
denisdulici
2018-04-26 18:40:04 +03:00
parent 1e4d4cf581
commit b5e937b58d
23 changed files with 347 additions and 58 deletions

View File

@ -44,24 +44,31 @@ class Payment extends Model
'description' ,
];
/**
* Clonable relationships.
*
* @var array
*/
protected $cloneable_relations = ['recurring'];
public function account()
{
return $this->belongsTo('App\Models\Banking\Account');
}
public function currency()
{
return $this->belongsTo('App\Models\Setting\Currency', 'currency_code', 'code');
}
public function category()
{
return $this->belongsTo('App\Models\Setting\Category');
}
public function vendor()
public function currency()
{
return $this->belongsTo('App\Models\Expense\Vendor');
return $this->belongsTo('App\Models\Setting\Currency', 'currency_code', 'code');
}
public function recurring()
{
return $this->morphOne('App\Models\Common\Recurring', 'recurrable');
}
public function transfers()
@ -69,6 +76,11 @@ class Payment extends Model
return $this->hasMany('App\Models\Banking\Transfer');
}
public function vendor()
{
return $this->belongsTo('App\Models\Expense\Vendor');
}
/**
* Get only transfers.
*