Invoice report
This commit is contained in:
@@ -31,6 +31,16 @@ class Project extends BaseModel {
|
||||
return $this->hasMany( 'Invoice' );
|
||||
}
|
||||
|
||||
public function forecasts()
|
||||
{
|
||||
return $this->hasMany( 'Forecast' );
|
||||
}
|
||||
|
||||
public function reservations()
|
||||
{
|
||||
return $this->hasMany( 'Reservation' );
|
||||
}
|
||||
|
||||
public function projectleader()
|
||||
{
|
||||
return $this->belongsTo( 'User', 'projectleader_id' );
|
||||
@@ -96,6 +106,8 @@ class Project extends BaseModel {
|
||||
'projectemployees.user' => function ( $q ) {
|
||||
$q->selectRaw( "id, CONCAT(firstname, ' ', middlename, ' ', lastname) AS fullname" );
|
||||
}] )
|
||||
->with(['forecasts'])
|
||||
->with(['reservations'])
|
||||
->with( 'projectemployees.projecthours' )
|
||||
->with( 'projectcosts.external' )
|
||||
->with( 'invoices.payments' )
|
||||
|
||||
Reference in New Issue
Block a user