public function testget_account_detail()
 {
     $opportunity = new Opportunity();
     $result = $opportunity->get_account_detail('1');
     $this->assertTrue(is_array($result));
 }
Example #2
0
 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     if (!empty($this->currency_id)) {
         $currency = new Currency();
         $currency->retrieve($this->currency_id);
         if ($currency->id != $this->currency_id || $currency->deleted == 1) {
             $this->amount = $this->amount_usdollar;
             $this->currency_id = $currency->id;
         }
     }
     //get campaign name
     if (!empty($this->campaign_id)) {
         $camp = new Campaign();
         $camp->retrieve($this->campaign_id);
         $this->campaign_name = $camp->name;
     }
     $this->account_name = '';
     $this->account_id = '';
     if (!empty($this->id)) {
         $ret_values = Opportunity::get_account_detail($this->id);
         if (!empty($ret_values)) {
             $this->account_name = $ret_values['name'];
             $this->account_id = $ret_values['id'];
             $this->account_id_owner = $ret_values['assigned_user_id'];
         }
     }
 }
 function fill_in_additional_detail_fields()
 {
     require_once 'modules/Currencies/Currency.php';
     $currency = new Currency();
     $currency->retrieve($this->currency_id);
     if ($currency->id != $this->currency_id || $currency->deleted == 1) {
         $this->amount = $this->amount_usdollar;
         $this->currency_id = $currency->id;
     }
     // Fill in the assigned_user_name
     $this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
     $this->account_name = '';
     $this->account_id = '';
     $ret_values = Opportunity::get_account_detail($this->id);
     if (!empty($ret_values)) {
         $this->account_name = $ret_values['name'];
         $this->account_id = $ret_values['id'];
         $this->account_id_owner = $ret_values['assigned_user_id'];
     }
     $this->created_by_name = get_assigned_user_name($this->created_by);
     $this->modified_by_name = get_assigned_user_name($this->modified_user_id);
 }