当前位置: 首页>>代码示例>>PHP>>正文


PHP Accounts::retrieve_entity_info方法代码示例

本文整理汇总了PHP中Accounts::retrieve_entity_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Accounts::retrieve_entity_info方法的具体用法?PHP Accounts::retrieve_entity_info怎么用?PHP Accounts::retrieve_entity_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Accounts的用法示例。


在下文中一共展示了Accounts::retrieve_entity_info方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildDocumentModel

 function buildDocumentModel()
 {
     global $app_strings;
     try {
         $model = parent::buildDocumentModel();
         $this->generateEntityModel($this->focus, 'Potentials', 'potential_', $model);
         $entity = new Accounts();
         if ($this->focusColumnValue('related_to')) {
             $entity->retrieve_entity_info($this->focusColumnValue('related_to'), 'Accounts');
         }
         $this->generateEntityModel($entity, 'Accounts', 'account_', $model);
         $entity = new Contacts();
         if ($this->focusColumnValue('contact_id')) {
             $entity->retrieve_entity_info($this->focusColumnValue('contact_id'), 'Contacts');
         }
         $this->generateEntityModel($entity, 'Contacts', 'contact_', $model);
         $this->generateUi10Models($model);
         $this->generateRelatedListModels($model);
         $model->set('potential_no', $this->focusColumnValue('potential_no'));
         $model->set('potential_owner', getUserFullName($this->focusColumnValue('assigned_user_id')));
         return $model;
     } catch (Exception $e) {
         echo '<meta charset="utf-8" />';
         if ($e->getMessage() == $app_strings['LBL_RECORD_DELETE']) {
             echo $app_strings['LBL_RECORD_INCORRECT'];
             echo '<br><br>';
         } else {
             echo $e->getMessage();
             echo '<br><br>';
         }
         return null;
     }
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:33,代码来源:PotentialsPDFController.php

示例2: buildDocumentModel

 function buildDocumentModel()
 {
     global $app_strings;
     try {
         $model = parent::buildDocumentModel();
         $this->generateEntityModel($this->focus, 'HelpDesk', 'helpdesk_', $model);
         $entity = new Products();
         if ($this->focusColumnValue('product_id')) {
             $entity->retrieve_entity_info($this->focusColumnValue('product_id'), 'Products');
         }
         $this->generateEntityModel($entity, 'Products', 'product_', $model);
         if ($this->focusColumnValue('parent_id')) {
             $setype = getSalesEntityType($this->focusColumnValue('parent_id'));
         }
         $account = new Accounts();
         $contact = new Contacts();
         if ($setype == 'Accounts') {
             $account->retrieve_entity_info($this->focusColumnValue('parent_id'), $setype);
         } elseif ($setype == 'Contacts') {
             $contact->retrieve_entity_info($this->focusColumnValue('parent_id'), $setype);
         }
         $this->generateEntityModel($account, 'Accounts', 'account_', $model);
         $this->generateEntityModel($contact, 'Contacts', 'contact_', $model);
         $this->generateUi10Models($model);
         $this->generateRelatedListModels($model);
         $model->set('helpdesk_owner', getUserFullName($this->focusColumnValue('assigned_user_id')));
         return $model;
     } catch (Exception $e) {
         echo '<meta charset="utf-8" />';
         if ($e->getMessage() == $app_strings['LBL_RECORD_DELETE']) {
             echo $app_strings['LBL_RECORD_INCORRECT'];
             echo '<br><br>';
         } else {
             echo $e->getMessage();
             echo '<br><br>';
         }
         return null;
     }
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:39,代码来源:HelpDeskPDFController.php

示例3: buildDocumentModel

 function buildDocumentModel()
 {
     global $app_strings;
     try {
         $model = parent::buildDocumentModel();
         $this->generateEntityModel($this->focus, 'Invoice', 'invoice_', $model);
         $entity = new SalesOrder();
         if ($this->focusColumnValue('salesorder_id')) {
             $entity->retrieve_entity_info($this->focusColumnValue('salesorder_id'), 'SalesOrder');
         }
         $this->generateEntityModel($entity, 'SalesOrder', 'salesorder_', $model);
         $entity = new Contacts();
         if ($this->focusColumnValue('contact_id')) {
             $entity->retrieve_entity_info($this->focusColumnValue('contact_id'), 'Contacts');
         }
         $this->generateEntityModel($entity, 'Contacts', 'contact_', $model);
         $entity = new Accounts();
         if ($this->focusColumnValue('account_id')) {
             $entity->retrieve_entity_info($this->focusColumnValue('account_id'), 'Accounts');
         }
         $this->generateEntityModel($entity, 'Accounts', 'account_', $model);
         $this->generateUi10Models($model);
         $this->generateRelatedListModels($model);
         $model->set('invoice_no', $this->focusColumnValue('invoice_no'));
         return $model;
     } catch (Exception $e) {
         echo '<meta charset="utf-8" />';
         if ($e->getMessage() == $app_strings['LBL_RECORD_DELETE']) {
             echo $app_strings['LBL_RECORD_INCORRECT'];
             echo '<br><br>';
         } else {
             echo $e->getMessage();
             echo '<br><br>';
         }
         return null;
     }
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:37,代码来源:InvoicePDFController.php

示例4: getValue


//.........这里部分代码省略.........
            } else {
                $value = $temp_val;
            }
        } elseif ($uitype == 25) {
            $contactid = $_REQUEST['record'];
            $emailid = $adb->query_result($list_result, $list_result_count, "activityid");
            $result = $adb->pquery("SELECT access_count FROM vtiger_email_track WHERE crmid=? AND mailid=?", array($contactid, $emailid));
            $value = $adb->query_result($result, 0, "access_count");
            if (!$value) {
                $value = 0;
            }
        } elseif ($uitype == 8) {
            if (!empty($temp_val)) {
                $temp_val = html_entity_decode($temp_val, ENT_QUOTES, $default_charset);
                $json = new Zend_Json();
                $value = vt_suppressHTMLTags(implode(',', $json->decode($temp_val)));
            }
        } else {
            if ($fieldname == $focus->list_link_field) {
                if ($mode == "search") {
                    if ($popuptype == "specific" || $popuptype == "toDospecific") {
                        // Added for get the first name of contact in Popup window
                        if ($colname == "lastname" && $module == 'Contacts') {
                            $temp_val = getFullNameFromQResult($list_result, $list_result_count, "Contacts");
                        }
                        $slashes_temp_val = popup_from_html($temp_val);
                        $slashes_temp_val = htmlspecialchars($slashes_temp_val, ENT_QUOTES, $default_charset);
                        //Added to avoid the error when select SO from Invoice through AjaxEdit
                        if ($module == 'SalesOrder') {
                            $value = '<a href="javascript:window.close();" onclick=\'set_return_specific("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '","' . $_REQUEST['form'] . '");\'>' . $temp_val . '</a>';
                        } elseif ($module == 'Contacts') {
                            require_once 'modules/Contacts/Contacts.php';
                            $cntct_focus = new Contacts();
                            $cntct_focus->retrieve_entity_info($entity_id, "Contacts");
                            $slashes_temp_val = popup_from_html($temp_val);
                            //ADDED TO CHECK THE FIELD PERMISSIONS FOR
                            $xyz = array('mailingstreet', 'mailingcity', 'mailingzip', 'mailingpobox', 'mailingcountry', 'mailingstate', 'otherstreet', 'othercity', 'otherzip', 'otherpobox', 'othercountry', 'otherstate');
                            for ($i = 0; $i < 12; $i++) {
                                if (getFieldVisibilityPermission($module, $current_user->id, $xyz[$i]) == '0') {
                                    $cntct_focus->column_fields[$xyz[$i]] = $cntct_focus->column_fields[$xyz[$i]];
                                } else {
                                    $cntct_focus->column_fields[$xyz[$i]] = '';
                                }
                            }
                            // For ToDo creation the underlying form is not named as EditView
                            $form = !empty($_REQUEST['form']) ? $_REQUEST['form'] : '';
                            if (!empty($form)) {
                                $form = htmlspecialchars($form, ENT_QUOTES, $default_charset);
                            }
                            $value = '<a href="javascript:window.close();" onclick=\'set_return_contact_address("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingstreet']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherstreet']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingcity']) . '", "' . popup_decode_html($cntct_focus->column_fields['othercity']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingstate']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherstate']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingzip']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherzip']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingcountry']) . '", "' . popup_decode_html($cntct_focus->column_fields['othercountry']) . '","' . popup_decode_html($cntct_focus->column_fields['mailingpobox']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherpobox']) . '","' . $form . '");\'>' . $temp_val . '</a>';
                        } else {
                            if ($popuptype == 'toDospecific') {
                                $value = '<a href="javascript:window.close();" onclick=\'set_return_toDospecific("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '");\'>' . $temp_val . '</a>';
                            } else {
                                $value = '<a href="javascript:window.close();" onclick=\'set_return_specific("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '");\'>' . $temp_val . '</a>';
                            }
                        }
                    } elseif ($popuptype == "detailview") {
                        if ($colname == "lastname" && ($module == 'Contacts' || $module == 'Leads')) {
                            $temp_val = getFullNameFromQResult($list_result, $list_result_count, $module);
                        }
                        $slashes_temp_val = popup_from_html($temp_val);
                        $slashes_temp_val = htmlspecialchars($slashes_temp_val, ENT_QUOTES, $default_charset);
                        $focus->record_id = $_REQUEST['recordid'];
                        if ($_REQUEST['return_module'] == "Calendar") {
                            $value = '<a href="javascript:window.close();" id="calendarCont' . $entity_id . '" LANGUAGE=javascript onclick=\'add_data_to_relatedlist_incal("' . $entity_id . '","' . decode_html($slashes_temp_val) . '");\'>' . $temp_val . '</a>';
开发者ID:latechdirect,项目名称:vtiger,代码行数:67,代码来源:ListViewUtils.php

示例5: Accounts

<?php

if (isset($_REQUEST['accountid']) && $_REQUEST['accountid'] != "") {
    require_once 'modules/Accounts/Accounts.php';
    require_once "include/Zend/Json.php";
    $focus = new Accounts();
    //$focus->id = $_REQUEST['accountid'];
    //$focus->mode = 'edit';
    $focus->retrieve_entity_info($_REQUEST['accountid'], "Accounts");
    $json = new Zend_Json();
    $jsonaccount = $json->encode($focus->column_fields);
    $log->info($jsonaccount);
    echo $jsonaccount;
}
die;
开发者ID:honj51,项目名称:taobaocrm,代码行数:15,代码来源:getAccountInfo.php

示例6: getValue


//.........这里部分代码省略.........
                } elseif ($popuptype == "formname_specific") {
                    $temp_val = popup_from_html($temp_val);
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_formname_specific("' . $_REQUEST['form'] . '", "' . $entity_id . '", "' . br2nl($temp_val) . '");\'>' . $temp_val . '</a>';
                } elseif ($popuptype == "inventory_prod") {
                    $row_id = $_REQUEST['curr_row'];
                    //To get all the tax types and values and pass it to product details
                    $tax_str = '';
                    $unitprice = $adb->query_result($list_result, $list_result_count, 'unit_price');
                    $qty_stock = $adb->query_result($list_result, $list_result_count, 'qtyinstock');
                    $productcode = $adb->query_result($list_result, $list_result_count, 'productcode');
                    $temp_val = popup_from_html($temp_val);
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_inventory("' . $entity_id . '", "' . br2nl($temp_val) . '", "' . $unitprice . '", "' . $qty_stock . '","' . $tax_str . '","' . $row_id . '","' . $productcode . '");\'>' . $temp_val . '</a>';
                } elseif ($popuptype == "inventory_prods") {
                    $unitprice = $adb->query_result($list_result, $list_result_count, 'unit_price');
                    $qty_stock = $adb->query_result($list_result, $list_result_count, 'qtyinstock');
                    $productcode = $adb->query_result($list_result, $list_result_count, 'productcode');
                    $serialno = $adb->query_result($list_result, $list_result_count, 'serialno');
                    $temp_val = popup_from_html($temp_val);
                    $value = $temp_val . '<input type="hidden" name="productname_' . $entity_id . '" id="productname_' . $entity_id . '" value="' . $temp_val . '"><input type="hidden" name="listprice_' . $entity_id . '" id="listprice_' . $entity_id . '" value="' . $unitprice . '"><input type="hidden" name="qtyinstock_' . $entity_id . '" id="qtyinstock_' . $entity_id . '" value="' . $qty_stock . '"><input type="hidden" id="productcode_' . $entity_id . '" name="productcode_' . $entity_id . '" value="' . $productcode . '"><input type="hidden" id="serialno_' . $entity_id . '" name="serialno_' . $entity_id . '" value="' . $serialno . '">';
                } elseif ($popuptype == "salesorder_prod") {
                    $row_id = $_REQUEST['curr_row'];
                    $unitprice = $adb->query_result($list_result, $list_result_count, 'unit_price');
                    $temp_val = popup_from_html($temp_val);
                    $producttype = $_REQUEST['producttype'];
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_inventory_so("' . $entity_id . '", "' . br2nl($temp_val) . '", "' . $unitprice . '", "' . $row_id . '","' . $producttype . '");\'>' . $temp_val . '</a>';
                } elseif ($popuptype == "inventory_prod_po") {
                    $row_id = $_REQUEST['curr_row'];
                    $unitprice = $adb->query_result($list_result, $list_result_count, 'unit_price');
                    $productcode = $adb->query_result($list_result, $list_result_count, 'productcode');
                    $temp_val = popup_from_html($temp_val);
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_inventory_po("' . $entity_id . '", "' . br2nl($temp_val) . '", "' . $unitprice . '", "' . $productcode . '","' . $row_id . '"); \'>' . $temp_val . '</a>';
                } elseif ($popuptype == "inventory_prod_noprice") {
                    $row_id = $_REQUEST['curr_row'];
                    $temp_val = popup_from_html($temp_val);
                    $qtyinstock = $adb->query_result($list_result, $list_result_count, 'qtyinstock');
                    $productcode = $adb->query_result($list_result, $list_result_count, 'productcode');
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_inventory_noprice("' . $entity_id . '", "' . br2nl($temp_val) . '","' . $row_id . '","' . $qtyinstock . '","' . $productcode . '");\'>' . $temp_val . '</a>';
                } elseif ($popuptype == "inventory_prod_check") {
                    $row_id = $_REQUEST['curr_row'];
                    $temp_val = popup_from_html($temp_val);
                    $productcode = $adb->query_result($list_result, $list_result_count, 'productcode');
                    $usageunit = $adb->query_result($list_result, $list_result_count, 'usageunit');
                    $qtyinstock = $adb->query_result($list_result, $list_result_count, 'qtyinstock');
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_inventory_check("' . $entity_id . '", "' . br2nl($temp_val) . '","' . $row_id . '","' . $productcode . '","' . $usageunit . '","' . $qtyinstock . '"); \'>' . $temp_val . '</a>';
                } elseif ($popuptype == "specific_account_address") {
                    require_once 'modules/Accounts/Accounts.php';
                    $acct_focus = new Accounts();
                    $acct_focus->retrieve_entity_info($entity_id, "Accounts");
                    $temp_val = popup_from_html($temp_val);
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_address("' . $entity_id . '", "' . br2nl($temp_val) . '", "' . br2nl($acct_focus->column_fields['bill_street']) . '", "' . br2nl($acct_focus->column_fields['ship_street']) . '", "' . br2nl($acct_focus->column_fields['bill_city']) . '", "' . br2nl($acct_focus->column_fields['ship_city']) . '", "' . br2nl($acct_focus->column_fields['bill_state']) . '", "' . br2nl($acct_focus->column_fields['ship_state']) . '", "' . br2nl($acct_focus->column_fields['bill_code']) . '", "' . br2nl($acct_focus->column_fields['ship_code']) . '", "' . br2nl($acct_focus->column_fields['bill_country']) . '", "' . br2nl($acct_focus->column_fields['ship_country']) . '","' . br2nl($acct_focus->column_fields['bill_pobox']) . '", "' . br2nl($acct_focus->column_fields['ship_pobox']) . '");\'>' . $temp_val . '</a>';
                } elseif ($popuptype == "specific_contact_account_address") {
                    require_once 'modules/Accounts/Accounts.php';
                    $acct_focus = new Accounts();
                    $acct_focus->retrieve_entity_info($entity_id, "Accounts");
                    $temp_val = popup_from_html($temp_val);
                    $value = '<a href="javascript:window.close();" onclick=\'set_return_contact_address("' . $entity_id . '", "' . br2nl($temp_val) . '", "' . br2nl($acct_focus->column_fields['bill_street']) . '", "' . br2nl($acct_focus->column_fields['ship_street']) . '", "' . br2nl($acct_focus->column_fields['bill_city']) . '", "' . br2nl($acct_focus->column_fields['ship_city']) . '", "' . br2nl($acct_focus->column_fields['bill_state']) . '", "' . br2nl($acct_focus->column_fields['ship_state']) . '", "' . br2nl($acct_focus->column_fields['bill_code']) . '", "' . br2nl($acct_focus->column_fields['ship_code']) . '", "' . br2nl($acct_focus->column_fields['bill_country']) . '", "' . br2nl($acct_focus->column_fields['ship_country']) . '","' . br2nl($acct_focus->column_fields['bill_pobox']) . '", "' . br2nl($acct_focus->column_fields['ship_pobox']) . '");\'>' . $temp_val . '</a>';
                } elseif ($popuptype == "specific_potential_account_address") {
                    $acntid = $adb->query_result($list_result, $list_result_count, "accountid");
                    if ($acntid != "") {
                        //require_once('modules/Accounts/Accounts.php');
                        //$acct_focus = new Accounts();
                        //$acct_focus->retrieve_entity_info($acntid,"Accounts");
                        $account_name = getAccountName($acntid);
                        $temp_val = popup_from_html($temp_val);
                        $value = '<a href="javascript:window.close();" onclick=\'set_return_address("' . $entity_id . '", "' . br2nl($temp_val) . '", "' . $acntid . '", "' . br2nl($account_name) . '");\'>' . $temp_val . '</a>';
                    } else {
                        $temp_val = popup_from_html($temp_val);
                        $value = '<a href="javascript:window.close();" >' . $temp_val . '</a>';
                    }
                } elseif ($popuptype == "set_return_emails") {
                    $name = $adb->query_result($list_result, $list_result_count, "lastname");
                    $emailaddress = $adb->query_result($list_result, $list_result_count, "email");
                    if ($emailaddress == '') {
                        $emailaddress = $adb->query_result($list_result, $list_result_count, "msn");
                    }
                    $where = isset($_REQUEST['where']) ? $_REQUEST['where'] : "";
                    $value = '<a href="javascript:;" onclick=\'return set_return_emails("' . $where . '","' . $name . '","' . $emailaddress . '"); \'>' . $name . '</a>';
                } elseif ($popuptype == "set_return_mobiles") {
                    //$firstname=$adb->query_result($list_result,$list_result_count,"first_name");
                    $contactname = $adb->query_result($list_result, $list_result_count, "lastname");
                    $mobile = $adb->query_result($list_result, $list_result_count, "mobile");
                    //changed by dingjianting on 2006-11-9 for simplized chinese
                    $value = '<a href="#" onclick=\'return set_return_mobiles(' . $entity_id . ',"' . $contactname . '","' . $mobile . '"); \'>' . $contactname . '</a>';
                } elseif ($popuptype == "set_return_usermobiles") {
                    //$firstname=$adb->query_result($list_result,$list_result_count,"first_name");
                    $lastname = $adb->query_result($list_result, $list_result_count, "last_name");
                    $mobile = $adb->query_result($list_result, $list_result_count, "phone_mobile");
                    //changed by dingjianting on 2006-11-9 for simplized chinese
                    $value = '<a href="#" onclick=\'return set_return_mobiles(' . $entity_id . ',"' . $lastname . '","' . $mobile . '"); \'>' . $lastname . '</a>';
                } else {
                    $temp_val = str_replace("'", '\\"', $temp_val);
                    $temp_val = popup_from_html($temp_val);
                    $value = '<a href="javascript:window.close();" onclick=\'set_return("' . $entity_id . '", "' . br2nl($temp_val) . '");\'>' . $temp_val . '</a>';
                }
            }
        }
    }
    $log->debug("Exiting getValue method ...");
    return $value;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:101,代码来源:ListViewUtils.php

示例7: GetAccountRecord

 /**
  * Get Account record information based on email.
  */
 function GetAccountRecord($email)
 {
     require_once 'modules/Accounts/Accounts.php';
     $accountid = $this->LookupAccount($email);
     $account_focus = false;
     if ($accountid) {
         if ($this->_cachedAccounts[$accountid]) {
             $account_focus = $this->_cachedAccounts[$accountid];
             $this->log("Reusing Cached Account [" . $account_focus->column_fields[accountname] . "]");
         } else {
             $account_focus = new Accounts();
             $account_focus->retrieve_entity_info($accountid, 'Accounts');
             $account_focus->id = $accountid;
             $this->log("Caching Account [" . $account_focus->column_fields[accountname] . "]");
             $this->_cachedAccounts[$accountid] = $account_focus;
         }
     }
     return $account_focus;
 }
开发者ID:jgjermeni,项目名称:corebos,代码行数:22,代码来源:MailScanner.php

示例8: getSalesEntityType

     $mail_status_str .= $emailadd . "=" . $mail_status . "&&&";
 } else {
     //Send mail to vtiger_account or lead or contact based on their ids
     $pmodule = getSalesEntityType($mycrmid);
     for ($j = 1; $j < $nemail; $j++) {
         $temp = $realid[$j];
         $myquery = 'Select columnname from vtiger_field where fieldid = ? and vtiger_field.presence in (0,2)';
         $fresult = $adb->pquery($myquery, array($temp));
         if ($pmodule == 'Contacts') {
             require_once 'modules/Contacts/Contacts.php';
             $myfocus = new Contacts();
             $myfocus->retrieve_entity_info($mycrmid, "Contacts");
         } elseif ($pmodule == 'Accounts') {
             require_once 'modules/Accounts/Accounts.php';
             $myfocus = new Accounts();
             $myfocus->retrieve_entity_info($mycrmid, "Accounts");
         } elseif ($pmodule == 'Leads') {
             require_once 'modules/Leads/Leads.php';
             $myfocus = new Leads();
             $myfocus->retrieve_entity_info($mycrmid, "Leads");
         } elseif ($pmodule == 'Vendors') {
             require_once 'modules/Vendors/Vendors.php';
             $myfocus = new Vendors();
             $myfocus->retrieve_entity_info($mycrmid, "Vendors");
         } else {
             // vtlib customization: Enabling mail send from other modules
             $myfocus = CRMEntity::getInstance($pmodule);
             $myfocus->retrieve_entity_info($mycrmid, $pmodule);
             // END
         }
         $fldname = $adb->query_result($fresult, 0, "columnname");
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:mailsend.php

示例9: explode

$return_action = $_REQUEST['return_action'];
global $rstart;
//Added to fix 4600
$url = getBasic_Advance_SearchURL();
if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
    $rstart = "&start=" . $_REQUEST['start'];
}
$quickedit_field = $_REQUEST['quickedit_field'];
$quickedit_value = $_REQUEST['quickedit_value'];
global $log;
$log->info("quickedit_field=" . $quickedit_field . ",quickedit_value=" . $quickedit_value);
if (isset($idlist)) {
    $recordids = explode(';', $idlist);
    $_REQUEST['ajxaction'] = "DETAILVIEW";
    for ($index = 0; $index < count($recordids); ++$index) {
        $recordid = $recordids[$index];
        $log->info("recordid=" . $recordid);
        if ($recordid == '') {
            continue;
        }
        // Save each module record with update value.
        $focus = new Accounts();
        $focus->retrieve_entity_info($recordid, 'Accounts');
        $focus->mode = 'edit';
        $focus->id = $recordid;
        $focus->column_fields[$quickedit_field] = $quickedit_value;
        $focus->save('Accounts');
        // END
    }
}
header("Location: index.php?module={$return_module}&action=" . $return_module . "Ajax&file=ListView&ajax=changestate" . $rstart . "&viewname=" . $viewid . "&errormsg=" . $errormsg . $url);
开发者ID:Pengzw,项目名称:c3crm,代码行数:31,代码来源:QuickEditSave.php

示例10: getOutputHtml


//.........这里部分代码省略.........
            if (empty($pmodule)) {
                $pmodule = $_REQUEST['par_module'];
            }
            if ($pmodule == 'Contacts') {
                $contact_selected = 'selected';
            } elseif ($pmodule == 'Accounts') {
                $account_selected = 'selected';
            } elseif ($pmodule == 'Leads') {
                $lead_selected = 'selected';
            } elseif ($pmodule == 'Vendors') {
                $vendor_selected = 'selected';
            } elseif ($pmodule == 'Users') {
                $user_selected = 'selected';
            } elseif ($pmodule == 'Project') {
                $project_selected = 'selected';
            } elseif ($pmodule == 'ProjectTask') {
                $projecttask_selected = 'selected';
            } elseif ($pmodule == 'Potentials') {
                $potentials_selected = 'selected';
            } elseif ($pmodule == 'HelpDesk') {
                $helpdesk_selected = 'selected';
            }
            if (isset($_REQUEST['emailids']) && $_REQUEST['emailids'] != '') {
                $parent_id = $_REQUEST['emailids'];
                $parent_name = '';
                $myids = explode("|", $parent_id);
                for ($i = 0; $i < count($myids) - 1; $i++) {
                    $realid = explode("@", $myids[$i]);
                    $entityid = $realid[0];
                    $nemail = count($realid);
                    if ($pmodule == 'Accounts') {
                        require_once 'modules/Accounts/Accounts.php';
                        $myfocus = new Accounts();
                        $myfocus->retrieve_entity_info($entityid, "Accounts");
                        $fullname = br2nl($myfocus->column_fields['accountname']);
                        $account_selected = 'selected';
                    } elseif ($pmodule == 'Contacts') {
                        require_once 'modules/Contacts/Contacts.php';
                        $myfocus = new Contacts();
                        $myfocus->retrieve_entity_info($entityid, "Contacts");
                        $fname = br2nl($myfocus->column_fields['firstname']);
                        $lname = br2nl($myfocus->column_fields['lastname']);
                        $fullname = $lname . ' ' . $fname;
                        $contact_selected = 'selected';
                    } elseif ($pmodule == 'Leads') {
                        require_once 'modules/Leads/Leads.php';
                        $myfocus = new Leads();
                        $myfocus->retrieve_entity_info($entityid, "Leads");
                        $fname = br2nl($myfocus->column_fields['firstname']);
                        $lname = br2nl($myfocus->column_fields['lastname']);
                        $fullname = $lname . ' ' . $fname;
                        $lead_selected = 'selected';
                    } elseif ($pmodule == 'Project') {
                        require_once 'modules/Project/Project.php';
                        $myfocus = new Project();
                        $myfocus->retrieve_entity_info($entityid, "Project");
                        $fname = br2nl($myfocus->column_fields['projectname']);
                        $lname = br2nl($myfocus->column_fields['projectid']);
                        $fullname = $fname;
                        $project_selected = 'selected';
                    } elseif ($pmodule == 'ProjectTask') {
                        require_once 'modules/ProjectTask/ProjectTask.php';
                        $myfocus = new ProjectTask();
                        $myfocus->retrieve_entity_info($entityid, "ProjectTask");
                        $fname = br2nl($myfocus->column_fields['projecttaskname']);
                        $lname = br2nl($myfocus->column_fields['projecttaskid']);
开发者ID:kduqi,项目名称:corebos,代码行数:67,代码来源:EditViewUtils.php

示例11: createInvoice

function createInvoice($salesorder_id)
{
    require_once 'include/utils/utils.php';
    require_once 'modules/SalesOrder/SalesOrder.php';
    require_once 'modules/Invoice/Invoice.php';
    require_once 'modules/Accounts/Accounts.php';
    require_once 'modules/Users/Users.php';
    global $log, $adb;
    global $current_user;
    // Payment duration in days
    $payment_duration_values = array('net 01 day' => '1', 'net 05 days' => '5', 'net 07 days' => '7', 'net 10 days' => '10', 'net 15 days' => '15', 'net 30 days' => '30', 'net 45 days' => '45', 'net 60 days' => '60');
    if (!$current_user) {
        $current_user = Users::getActiveAdminUser();
    }
    //End if
    $so_focus = new SalesOrder();
    $so_focus->id = $salesorder_id;
    $so_focus->retrieve_entity_info($salesorder_id, "SalesOrder");
    //SalesOrderのデータ抽出
    foreach ($so_focus->column_fields as $fieldname => $value) {
        #	print $fieldname . " : " . $value. "<br />";
        $so_focus->column_fields[$fieldname] = decode_html($value);
    }
    //End foreach
    $account_id = $so_focus->column_fields[account_id];
    /** ▼ ** 顧客情報呼び出し ****/
    $ac_focus = new Accounts();
    $ac_focus->id = $account_id;
    #	print "アカウントID : ".$account_id."<br />";
    $ac_focus->retrieve_entity_info($account_id, "Accounts");
    foreach ($ac_focus->column_fields as $fieldname => $value) {
        $ac_focus->column_fields[$fieldname] = decode_html($value);
    }
    //End foreach
    /** ▲ ** 顧客情報呼び出し ****/
    $strPayDay = $ac_focus->column_fields[payday];
    $focus = new Invoice();
    // This will only fill in the basic columns from SO to Invoice and also Update the SO id in new Invoice
    $focus = getConvertSoToInvoice($focus, $so_focus, $salesorder_id);
    switch ($strPayDay) {
        case '翌々月10日(40日)':
            $durationinsec = date('Y-m', strtotime('+2 month' . $_POST[first_date])) . "-10";
            break;
        case '翌々月15日(45日)':
            $durationinsec = date('Y-m', strtotime('+2 month' . $_POST[first_date])) . "-15";
            break;
        case '翌々月末日(60日)':
            $durationinsec = date('Y-m-t', strtotime('+2 month' . $_POST[first_date]));
            break;
        case '3ヶ月後10日(100日)':
            $durationinsec = date('Y-m', strtotime('+3 month' . $_POST[first_date])) . "-10";
            break;
        case '翌月10日':
            $durationinsec = date('Y-m', strtotime('+1 month' . $_POST[first_date])) . "-10";
            break;
        case '翌月15日':
            $durationinsec = date('Y-m', strtotime('+1 month' . $_POST[first_date])) . "-15";
            break;
        case '翌月20日':
            $durationinsec = date('Y-m', strtotime('+1 month' . $_POST[first_date])) . "-20";
            break;
        case '翌月末(30日)':
            $durationinsec = date('Y-m-t', strtotime($_POST[first_date] . ' +1 month'));
            break;
    }
    //End switch
    // Pick up the Payment due date based on the Configuration in SO
    #	$payment_duration = $so_focus->column_fields['payment_duration'];
    #	$due_duration = $payment_duration_values[trim(strtolower($payment_duration))];
    #	$durationinsec = mktime(0,0,0,date('m'),date('d')+$due_duration,date('Y'));
    // Cleanup focus object, to duplicate the Invoice.
    $focus->id = '';
    $focus->mode = '';
    #	$focus->column_fields['invoicestatus'] = $so_focus->column_fields['invoicestatus'];
    $focus->column_fields['invoicestatus'] = "自動作成";
    $focus->column_fields['closing_week'] = $so_focus->column_fields['closing_week'];
    $focus->column_fields['invoicedate'] = date('Y-m-t', strtotime($_POST[first_date]));
    #	$focus->column_fields['duedate'] = date('Y-m-d', $durationinsec);
    if (preg_match('@\\-12\\-31@', $durationinsec)) {
        $focus->column_fields['duedate'] = '2015-12-28';
    } else {
        $focus->column_fields['duedate'] = $durationinsec;
    }
    //End if
    #	print "<p>受注実績番号 : ".$so_focus->column_fields['salesorder_no']."</p>";
    $focus->column_fields['salesorder_no'] = $so_focus->column_fields['salesorder_no'];
    #受注実績番号
    $focus->column_fields['salesamount'] = $so_focus->column_fields['salesamount'];
    #売上
    $focus->column_fields['amount'] = $so_focus->column_fields['amount'];
    #粗利
    if (preg_match('@\\((.*?)分\\)|((.*?)分)@', $so_focus->column_fields['description'])) {
        $focus->column_fields['description'] = $so_focus->column_fields['description'];
    } else {
        $focus->column_fields['description'] = "";
    }
    //End if
    $focus->column_fields['outcome'] = "固定";
    // Additional SO fields to copy -> Invoice field name mapped to equivalent SO field name
    $invoice_so_fields = array('txtAdjustment' => 'txtAdjustment', 'hdnSubTotal' => 'hdnSubTotal', 'hdnGrandTotal' => 'hdnGrandTotal', 'hdnTaxType' => 'hdnTaxType', 'hdnDiscountPercent' => 'hdnDiscountPercent', 'hdnDiscountAmount' => 'hdnDiscountAmount', 'hdnS_H_Amount' => 'hdnS_H_Amount', 'assigned_user_id' => 'assigned_user_id', 'currency_id' => 'currency_id', 'conversion_rate' => 'conversion_rate', 'division' => 'division', 'pre_tax_total' => 'pre_tax_total', 'balance' => 'hdnGrandTotal', 'margin_rate' => 'margin_rate');
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:101,代码来源:claim_data_kuma151229.php

示例12: Accounts

    $COMPANY_LOGO = $adb->query_result($result, 0, "logoname");
    $log_path = str_replace("-", "", "t-e-st/logo/");
    $COMPANY_LOGO_PATH = $log_path . $COMPANY_LOGO;
    $COMPANY_PERSON = $adb->query_result($result, 0, "person");
    $COMPANY_BANKNAME = $adb->query_result($result, 0, "bankname");
    $COMPANY_BANKACCOUNT = $adb->query_result($result, 0, "bankaccount");
    $COMPANY_TAXNO = $adb->query_result($result, 0, "taxno");
}
$sql = "select currency_symbol from ec_currency_info";
$result = $adb->query($sql);
$currency_symbol = $adb->query_result($result, 0, 'currency_symbol');
$id = $_REQUEST['record'];
$account_id = $focus->column_fields["account_id"];
if (!empty($account_id)) {
    $account_focus = new Accounts();
    $account_focus->retrieve_entity_info($account_id, "Accounts");
    foreach ($account_focus->column_fields as $key => $value) {
        $upperKey = "ACCOUNT_" . strtoupper($key);
        ${$upperKey} = $value;
    }
    $ACCOUNT_PHONE = $account_focus->column_fields["phone"];
    $ACCOUNT_FAX = $account_focus->column_fields["fax"];
    $ACCOUNT_NAME = $account_focus->column_fields["accountname"];
    $ACCOUNT_STREET = $account_focus->column_fields["bill_street"];
    $ACCOUNT_CITY = $account_focus->column_fields["bill_city"];
    $ACCOUNT_STATE = $account_focus->column_fields["bill_state"];
    $ACCOUNT_CODE = $account_focus->column_fields["bill_code"];
} else {
    $ACCOUNT_PHONE = "";
    $ACCOUNT_NAME = "";
    $ACCOUNT_FAX = "";
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:CreatePDFPrint.php


注:本文中的Accounts::retrieve_entity_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。