Invoice report

This commit is contained in:
2018-03-07 17:03:45 +01:00
parent f540bab261
commit ad478b02b1
25 changed files with 1006 additions and 125 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* Created by Pensare Software.
* User: Theo Weijmer
* Date: 07/03/2018
* Time: 09:24
*/
class Forecast extends BaseModel {
public function project()
{
return $this->belongsTo( 'Project' );
}
public static function saveForecast( $forecastID, $forecast )
{
$forecast = (array) $forecast;
if ( $forecastID == 0 )
{
$forecast = self::create( $forecast );
$forecastID = $forecast['id'];
}
else
{
self::whereId( $forecastID )->update( $forecast );
}
return $forecastID;
}
public static function removeForecast( $forecastID )
{
Forecast::whereId( $forecastID )->delete();
}
}