projecten
This commit is contained in:
@@ -26,12 +26,14 @@ class Offer extends BaseModel {
|
||||
return $this->belongsTo( 'Customer' );
|
||||
}
|
||||
|
||||
public static function getAllOffers( $archive = 'F' )
|
||||
public static function getAllOffers( $projectID, $archive = 'F' )
|
||||
{
|
||||
$offers = Offer::orderBy( 'startdate' )
|
||||
->with( 'customer' )
|
||||
->with( 'project' );
|
||||
|
||||
if ( $projectID ) $offers = $offers->whereProjectId( $projectID );
|
||||
|
||||
if ( $archive == 'F' ) $offers = $offers->whereArchive( 'F' );
|
||||
|
||||
$offers = $offers->get();
|
||||
|
||||
Reference in New Issue
Block a user