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

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

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

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

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

@param array $data
An array as follows: array('name'=>$name, 'pl_bs_category'=>$plBsCategory, 'deferral_method'=>$deferralMethod,
'lang_key'=>$langKey, 'organization_id'=>$organizationId
);

@param Mgallegos\DecimaAccounting\AccountType $AccountType

@return boolean
Update an existing account type