mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Link project to client so we get some default when adding to an invoice
This commit is contained in:
parent
acd5b7118e
commit
79908e75eb
@ -16,6 +16,7 @@ class AddTimesheets extends Migration {
|
||||
$t->increments('id');
|
||||
$t->unsignedInteger('user_id');
|
||||
$t->unsignedInteger('account_id')->index();
|
||||
$t->unsignedInteger('client_id')->nullable();
|
||||
$t->timestamps();
|
||||
$t->softDeletes();
|
||||
|
||||
|
@ -31,6 +31,11 @@ class Client extends EntityModel
|
||||
{
|
||||
return $this->hasMany('Contact');
|
||||
}
|
||||
|
||||
public function projects()
|
||||
{
|
||||
return $this->hasMany('Project');
|
||||
}
|
||||
|
||||
public function country()
|
||||
{
|
||||
|
@ -15,6 +15,11 @@ class Project extends Eloquent
|
||||
return $this->belongsTo('User');
|
||||
}
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo('Client');
|
||||
}
|
||||
|
||||
public function codes()
|
||||
{
|
||||
return $this->hasMany('ProjectCode');
|
||||
|
Loading…
Reference in New Issue
Block a user