public function update(array $data, $FiscalYear = null)
  {
    if(empty($FiscalYear))
    {
      $FiscalYear = $this->byId($data['id']);
    }

    foreach ($data as $key => $value)
    {
      $FiscalYear->$key = $value;
    }

    return $FiscalYear->save();
  }
public function update(array $data, $FiscalYear = null)
  {
    if(empty($FiscalYear))
    {
      $FiscalYear = $this->byId($data['id']);
    }

    foreach ($data as $key => $value)
    {
      $FiscalYear->$key = $value;
    }

    return $FiscalYear->save();
  }
public function update ( array $ data , $ FiscalYear = null ) { if ( empty ( $ FiscalYear ) ) { $ FiscalYear = $ this -> byId ( $ data [ 'id' ] ) ; } foreach ( $ data as $ key => $ value ) { $ FiscalYear -> $ key = $ value ; } return $ FiscalYear -> save ( ) ; }
Update an existing fiscal year

@param array $data
An array as follows: array('year'=>$year, 'start_date'=>$startDate, 'end_date'=>$endDate,
'is_closed'=>$isClosed, 'organization_id'=>$organizationId
);

@param Mgallegos\DecimaAccounting\FiscalYear $FiscalYear

@return boolean
Update an existing fiscal year