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

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

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

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

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

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

@param Mgallegos\DecimaAccounting\Period $Period

@return boolean
Update an existing period