This commit is contained in:
2018-01-16 13:36:59 +01:00
parent 97f1b988bc
commit 00246f49f7
10 changed files with 248 additions and 41 deletions
+7 -2
View File
@@ -11,6 +11,11 @@ class Offer extends BaseModel {
protected $table = "offers";
public function payments()
{
return $this->hasMany( 'Payment' );
}
public function project()
{
return $this->belongsTo( 'Project' );
@@ -23,7 +28,7 @@ class Offer extends BaseModel {
public static function getAllOffers( $archive = 'F' )
{
$offers = Offer::orderBy('startdate')
$offers = Offer::orderBy( 'startdate' )
->with( 'customer' )
->with( 'project' );
@@ -56,6 +61,6 @@ class Offer extends BaseModel {
public static function removeOffer( $offerID )
{
Offer::whereId($offerID)->delete();
Offer::whereId( $offerID )->delete();
}
}