示例#1
0
 public function testOrganizerDefaultAcceptance()
 {
     global $current_user;
     global $db;
     $_POST['user_invitees'] = $current_user->id;
     $_POST['module'] = 'Calls';
     $_POST['action'] = 'Save';
     $_POST['assigned_user_id'] = $current_user->id;
     $formBase = new CallFormBase();
     $call = $formBase->handleSave('', false, false);
     $sql = "SELECT accept_status FROM calls_users WHERE call_id='{$call->id}' AND user_id='{$current_user->id}'";
     $result = $db->query($sql);
     if ($row = $db->fetchByAssoc($result)) {
         $this->assertEquals('accept', $row['accept_status'], 'Should be accepted for the organizer.');
     }
 }
示例#2
0
 $_POST['ContactNotesparent_id'] = $contact->id;
 $contactnote = $noteForm->handleSave('ContactNotes', false, false);
 if (isset($opportunity)) {
     $_POST['OpportunityNotesparent_type'] = "Opportunities";
     $_POST['OpportunityNotesparent_id'] = $opportunity->id;
     $opportunitynote = $noteForm->handleSave('OpportunityNotes', false, false);
 }
 if (isset($_POST['newappointment']) && $_POST['newappointment'] == 'on') {
     if (isset($_POST['appointment']) && $_POST['appointment'] == 'Meeting') {
         require_once 'modules/Meetings/MeetingFormBase.php';
         $meetingForm = new MeetingFormBase();
         $meeting = $meetingForm->handleSave('Appointments', false, false);
     } else {
         require_once 'modules/Calls/CallFormBase.php';
         $callForm = new CallFormBase();
         $call = $callForm->handleSave('Appointments', false, false);
     }
 }
 if (isset($call)) {
     if (isset($contact)) {
         $call->load_relationship('contacts');
         $call->contacts->add($contact->id);
     } else {
         if (isset($account)) {
             $call->load_relationship('account');
             $call->account->add($account->id);
         } else {
             if (isset($opportunity)) {
                 $call->load_relationship('opportunity');
                 $call->opportunity->add($opportunity->id);
             }
示例#3
0
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
/*********************************************************************************
 * Description:  Saves an Account record and then redirects the browser to the 
 * defined return URL.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
require_once 'modules/Calls/CallFormBase.php';
$formBase = new CallFormBase();
$formBase->handleSave('', true, false);