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
@@ -0,0 +1,38 @@
<?php
/**
* Created by Pensare Software.
* User: Theo Weijmer
* Date: 07/03/2018
* Time: 09:24
*/
class Reservation extends BaseModel {
public function project()
{
return $this->belongsTo( 'Project' );
}
public static function saveReservation( $reservationID, $reservation )
{
$reservation = (array) $reservation;
if ( $reservationID == 0 )
{
$reservation = self::create( $reservation );
$reservationID = $reservation['id'];
}
else
{
self::whereId( $reservationID )->update( $reservation );
}
return $reservationID;
}
public static function removeReservation( $reservationID )
{
Reservation::whereId( $reservationID )->delete();
}
}