Beispiel #1
0
 /**
  * @see SugarBean::populateRelatedBean()
  */
 public function populateRelatedBean(SugarBean $newbean)
 {
     parent::populateRelatedBean($newbean);
     if ($newbean instanceof Company) {
         $newbean->phone_fax = $this->phone_fax;
         $newbean->phone_office = $this->phone_work;
         $newbean->phone_alternate = $this->phone_other;
         $newbean->email1 = $this->email1;
         $this->add_address_streets('primary_address_street');
         $newbean->billing_address_street = $this->primary_address_street;
         $newbean->billing_address_city = $this->primary_address_city;
         $newbean->billing_address_state = $this->primary_address_state;
         $newbean->billing_address_postalcode = $this->primary_address_postalcode;
         $newbean->billing_address_country = $this->primary_address_country;
         $this->add_address_streets('alt_address_street');
         $newbean->shipping_address_street = $this->alt_address_street;
         $newbean->shipping_address_city = $this->alt_address_city;
         $newbean->shipping_address_state = $this->alt_address_state;
         $newbean->shipping_address_postalcode = $this->alt_address_postalcode;
         $newbean->shipping_address_country = $this->alt_address_country;
     }
 }