conflicts
This commit is contained in:
@@ -82,8 +82,8 @@ class Project extends BaseModel {
|
||||
{
|
||||
$project = Project::getBaseProject();
|
||||
|
||||
$project = $project->whereArchive( 'F' )
|
||||
->whereId( $projectID )
|
||||
$project = $project->whereId( $projectID )
|
||||
// ->whereArchive( 'F' )
|
||||
->first();
|
||||
|
||||
return $project;
|
||||
@@ -183,4 +183,15 @@ class Project extends BaseModel {
|
||||
self::whereId( $offer->project_id )
|
||||
->update( ['projectname' => $offer->offername] );
|
||||
}
|
||||
|
||||
public static function getProjectsWithExternalCosts( $projects )
|
||||
{
|
||||
$projectCosts = self::selectRAW( 'projects.id, OFF.costs' )
|
||||
->join( 'offers AS OFF', 'OFF.project_id', '=', 'projects.id' )
|
||||
->whereNotIn( 'projects.id', $projects )
|
||||
->where( 'OFF.costs', '>', 0 )
|
||||
->get();
|
||||
|
||||
return $projectCosts;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user