mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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->increments('id');
|
||||||
$t->unsignedInteger('user_id');
|
$t->unsignedInteger('user_id');
|
||||||
$t->unsignedInteger('account_id')->index();
|
$t->unsignedInteger('account_id')->index();
|
||||||
|
$t->unsignedInteger('client_id')->nullable();
|
||||||
$t->timestamps();
|
$t->timestamps();
|
||||||
$t->softDeletes();
|
$t->softDeletes();
|
||||||
|
|
||||||
|
@ -32,6 +32,11 @@ class Client extends EntityModel
|
|||||||
return $this->hasMany('Contact');
|
return $this->hasMany('Contact');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function projects()
|
||||||
|
{
|
||||||
|
return $this->hasMany('Project');
|
||||||
|
}
|
||||||
|
|
||||||
public function country()
|
public function country()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('Country');
|
return $this->belongsTo('Country');
|
||||||
|
@ -15,6 +15,11 @@ class Project extends Eloquent
|
|||||||
return $this->belongsTo('User');
|
return $this->belongsTo('User');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function client()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('Client');
|
||||||
|
}
|
||||||
|
|
||||||
public function codes()
|
public function codes()
|
||||||
{
|
{
|
||||||
return $this->hasMany('ProjectCode');
|
return $this->hasMany('ProjectCode');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user