• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getSoName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getSoName函数的典型用法代码示例。如果您正苦于以下问题:PHP getSoName函数的具体用法?PHP getSoName怎么用?PHP getSoName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: x10

 private function x10($x92, $x93, $x94 = false, $x95 = false)
 {
     global $x15d, $x15e, $x15f, $x160, $x161, $x162, $x163, $x164, $x165, $x166, $x167, $x168, $x169, $x16a, $x16b, $x16c, $x16d, $x16e, $x16f, $x170, $x171, $x172, $x173, $x174, $x175, $x176, $x177, $x178;
     $x96 = Users_Record_Model::getCurrentUserModel();
     $x97 = array("related_to", "relatedto", "parent_id", "parentid", "product_id", "productid", "service_id", "serviceid", "vendor_id", "product", "account", "invoiceid", "linktoaccountscontacts", "projectid", "sc_related_to");
     if ($x95 !== false) {
         $x98 = array();
     }
     $x51 = getTabid($x92);
     $x99 = $x92;
     if ($x94 === false) {
         $x9a = "";
     } else {
         $x9a = "R_";
         if ($x94 !== true) {
             $x99 = $x94;
         }
     }
     $x9b = array();
     $x9c = array();
     $x9d = array();
     $x9e = array();
     $x9f = array();
     $xa0 = array();
     $xa1 = array();
     if ($x51 == '9') {
         $x3d = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid IN (9,16)";
     } else {
         $x3d = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid = '" . $x51 . "'";
     }
     $x3e = self::$x0f->query($x3d);
     while ($x42 = self::$x0f->fetchByAssoc($x3e)) {
         switch ($x42['uitype']) {
             case '19':
             case '20':
             case '21':
             case '24':
                 $x9d[] = $x42['fieldname'];
                 break;
             case '5':
             case '6':
             case '23':
             case '70':
                 $x9e[] = $x42['fieldname'];
                 break;
             case '15':
                 $x9c[] = $x42['fieldname'];
                 break;
             case '56':
                 $x9b[] = $x42['fieldname'];
                 break;
             case '33':
                 $x9f[] = $x42['fieldname'];
                 break;
             case '71':
                 $xa0[] = $x42['fieldname'];
                 break;
             case '9':
                 $xa1[] = $x42['fieldname'];
                 break;
         }
         if ($x42["fieldname"] == "salutationtype") {
             $x9c[] = $x42["fieldname"];
         }
     }
     foreach ($x93->column_fields as $xa2 => $x83) {
         if ($xa2 == "assigned_user_id") {
             $x83 = $this->x1e($x83);
         } elseif ($xa2 == "account_id") {
             $x83 = getAccountName($x83);
         } elseif ($xa2 == "potential_id") {
             $x83 = getPotentialName($x83);
         } elseif ($xa2 == "contact_id") {
             $x83 = getContactName($x83);
         } elseif ($xa2 == "quote_id") {
             $x83 = getQuoteName($x83);
         } elseif ($xa2 == "salesorder_id") {
             $x83 = getSoName($x83);
         } elseif ($xa2 == "campaignid") {
             $x83 = getCampaignName($x83);
         } elseif ($xa2 == "terms_conditions") {
             $x83 = $this->x25($x83);
         } elseif ($xa2 == "comments") {
             $x83 = $this->x26($x93);
         } elseif ($xa2 == "folderid") {
             $x83 = $this->x27($x83);
         } elseif ($xa2 == "time_start" || $xa2 == "time_end") {
             $xa3 = DateTimeField::convertToUserTimeZone($x83);
             $x83 = $xa3->format('H:i');
         } elseif ($x168($xa2, $x97)) {
             if ($x83 != "") {
                 $xa4 = getSalesEntityType($x83);
                 $xa5 = getEntityName($xa4, $x83);
                 if (!empty($xa5)) {
                     foreach ($xa5 as $xa6) {
                         $x83 = $xa6;
                     }
                 }
                 if ($xa2 == "invoiceid" && $x83 == "0") {
                     $x83 = "";
//.........这里部分代码省略.........
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:101,代码来源:PDFContent.php


示例2: getValue


//.........这里部分代码省略.........
            if ($parenttype == "Contacts") {
                $tablename = "vtiger_contactdetails";
                $fieldname = "contactname";
                $idname = "contactid";
            }
            if ($parenttype == "Accounts") {
                $tablename = "vtiger_account";
                $fieldname = "accountname";
                $idname = "accountid";
            }
            if ($parentid != '') {
                $sql = "SELECT * FROM {$tablename} WHERE {$idname} = ?";
                $fieldvalue = $adb->query_result($adb->pquery($sql, array($parentid)), 0, $fieldname);
                $value = '<a href=index.php?module=' . $parenttype . '&action=DetailView&record=' . $parentid . '&parenttab=' . urlencode($tabname) . '>' . $fieldvalue . '</a>';
            } else {
                $value = '';
            }
        } elseif ($uitype == 78) {
            if ($temp_val != '') {
                $quote_name = getQuoteName($temp_val);
                $value = '<a href=index.php?module=Quotes&action=DetailView&record=' . $temp_val . '&parenttab=' . urlencode($tabname) . '>' . textlength_check($quote_name) . '</a>';
            } else {
                $value = '';
            }
        } elseif ($uitype == 79) {
            if ($temp_val != '') {
                $purchaseorder_name = getPoName($temp_val);
                $value = '<a href=index.php?module=PurchaseOrder&action=DetailView&record=' . $temp_val . '&parenttab=' . urlencode($tabname) . '>' . textlength_check($purchaseorder_name) . '</a>';
            } else {
                $value = '';
            }
        } elseif ($uitype == 80) {
            if ($temp_val != '') {
                $salesorder_name = getSoName($temp_val);
                $value = "<a href=index.php?module=SalesOrder&action=DetailView&record={$temp_val}&parenttab=" . urlencode($tabname) . ">" . textlength_check($salesorder_name) . '</a>';
            } else {
                $value = '';
            }
        } elseif ($uitype == 75 || $uitype == 81) {
            if ($temp_val != '') {
                $vendor_name = getVendorName($temp_val);
                $value = '<a href=index.php?module=Vendors&action=DetailView&record=' . $temp_val . '&parenttab=' . urlencode($tabname) . '>' . textlength_check($vendor_name) . '</a>';
            } else {
                $value = '';
            }
        } elseif ($uitype == 98) {
            $value = '<a href="index.php?action=RoleDetailView&module=Settings&parenttab=Settings&roleid=' . $temp_val . '">' . textlength_check(getRoleName($temp_val)) . '</a>';
        } elseif ($uitype == 33) {
            $value = $temp_val != "" ? str_ireplace(' |##| ', ', ', $temp_val) : "";
            if (!$is_admin && $value != '') {
                $value = $field_val != "" ? str_ireplace(' |##| ', ', ', $field_val) : "";
                if ($value != '') {
                    $value_arr = explode(',', trim($value));
                    $roleid = $current_user->roleid;
                    $subrole = getRoleSubordinates($roleid);
                    if (count($subrole) > 0) {
                        $roleids = $subrole;
                        array_push($roleids, $roleid);
                    } else {
                        $roleids = $roleid;
                    }
                    if (count($roleids) > 0) {
                        $pick_query = "select distinct {$fieldname} from vtiger_{$fieldname} inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_{$fieldname}.picklist_valueid where roleid in (" . generateQuestionMarks($roleids) . ") and picklistid in (select picklistid from vtiger_{$fieldname}) order by {$fieldname} asc";
                        $params = array($roleids);
                    } else {
                        $pick_query = "select distinct {$fieldname} from vtiger_{$fieldname} inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_{$fieldname}.picklist_valueid where picklistid in (select picklistid from vtiger_{$fieldname}) order by {$fieldname} asc";
开发者ID:latechdirect,项目名称:vtiger,代码行数:67,代码来源:ListViewUtils.php


示例3: getOutputHtml


//.........这里部分代码省略.........
                $chk_val = '';
            }
            $options[] = array($pickListValue => $chk_val);
        }
        $fieldvalue[] = $options;
    } elseif ($uitype == 59) {
        if ($value != '') {
            $product_name = getProductName($value);
        }
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = $product_name;
        $fieldvalue[] = $value;
    } elseif ($uitype == 64) {
        $editview_label[] = $mod_strings[$fieldlabel];
        $date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
        $fieldvalue[] = $value;
    } elseif ($uitype == 56) {
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = $value;
    } elseif ($uitype == 57) {
        $accountid = $col_fields['account_id'];
        if (empty($accountid)) {
            $convertmode = "";
            if (isset($_REQUEST['convertmode'])) {
                $convertmode = $_REQUEST['convertmode'];
            }
            if ($convertmode != 'update_quote_val' && $convertmode != 'update_so_val') {
                if (isset($_REQUEST['account_id']) && $_REQUEST['account_id'] != '') {
                    $accountid = $_REQUEST['account_id'];
                }
            }
        }
        $contact_name = '';
        //		if(trim($value) != '')
        //		{
        //			$contact_name = getContactName($value);
        //		}
        //		elseif(isset($_REQUEST['contact_id']) && $_REQUEST['contact_id'] != '')
        //		{
        //			if(isset($_REQUEST['module']) && $_REQUEST['module'] == 'Contacts' && $fieldname = 'contact_id')
        //			{
        //				$contact_name = '';
        //			}
        //			else
        //			{
        //				$value = $_REQUEST['contact_id'];
        //				$contact_name = getContactName($value);
        //			}
        //
        //		}
        if (trim($value) == '') {
            if (isset($_REQUEST['module']) && $_REQUEST['module'] == 'Contacts' && ($fieldname = 'contact_id')) {
            } else {
                $value = $_REQUEST['contact_id'];
            }
        }
        $contactopts = getContactOptions($accountid, $value);
        //Checking for contacts duplicate
        $editview_label[] = $mod_strings[$fieldlabel];
        //		$fieldvalue[] = $contact_name;
        $fieldvalue[] = $contactopts;
        $fieldvalue[] = $value;
    } elseif ($uitype == 76) {
        if ($value != '') {
            $potential_name = getPotentialName($value);
        } elseif (isset($_REQUEST['potential_id']) && $_REQUEST['potential_id'] != '') {
            $value = $_REQUEST['potental_id'];
            $potential_name = getPotentialName($value);
        } elseif (isset($_REQUEST['potentialid']) && $_REQUEST['potentialid'] != '') {
            $value = $_REQUEST['potentalid'];
            $potential_name = getPotentialName($value);
        }
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = $potential_name;
        $fieldvalue[] = $value;
    } elseif ($uitype == 80) {
        if ($value != '') {
            $salesorder_name = getSoName($value);
        } elseif (isset($_REQUEST['salesorder_id']) && $_REQUEST['salesorder_id'] != '') {
            $value = $_REQUEST['salesorder_id'];
            $salesorder_name = getSoName($value);
        }
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = $salesorder_name;
        $fieldvalue[] = $value;
    } elseif ($uitype == 101) {
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = getUserName($value);
        $fieldvalue[] = $value;
    } else {
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = $value;
    }
    $final_arr[] = $ui_type;
    $final_arr[] = $editview_label;
    $final_arr[] = $editview_fldname;
    $final_arr[] = $fieldvalue;
    $log->debug("Exiting getOutputHtml method ...");
    return $final_arr;
}
开发者ID:Pengzw,项目名称:c3crm,代码行数:101,代码来源:EditViewUtils.php


示例4: getValue

function getValue($uitype, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, $mode, $popuptype, $returnset = '', $viewid = '')
{
    global $log;
    global $app_strings;
    //changed by dingjianting on 2007-11-05 for php5.2.x
    $log->debug("Entering getValue() method ...");
    global $adb, $current_user;
    if ($uitype == 10) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != "") {
            $value = "";
            $module_entityname = "";
            $modulename_lower = substr($fieldname, 0, -2);
            $modulename = ucfirst($modulename_lower);
            $modulesid = $modulename_lower . "id";
            $tablename = "ec_" . $modulename_lower;
            $entityname = substr($fieldname, 0, -3) . "name";
            $query = "SELECT {$entityname} FROM {$tablename} WHERE {$modulesid}='" . $temp_val . "' and deleted=0";
            $fldmod_result = $adb->query($query);
            $rownum = $adb->num_rows($fldmod_result);
            if ($rownum > 0) {
                $value = $adb->query_result($fldmod_result, 0, $entityname);
            }
        } else {
            $value = '';
        }
    } elseif ($uitype == 52 || $uitype == 53 || $uitype == 77) {
        $value = $adb->query_result($list_result, $list_result_count, 'user_name');
    } elseif ($uitype == 5 || $uitype == 6 || $uitype == 23 || $uitype == 70) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if (isValidDate($temp_val)) {
            $value = getDisplayDate($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 33) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = str_ireplace(' |##| ', ', ', $temp_val);
    } elseif ($uitype == 17) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = '<a href="http://' . $temp_val . '" target="_blank">' . $temp_val . '</a>';
    } elseif ($uitype == 13 || $uitype == 104) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = '<a href="' . getComposeMailUrl($temp_val) . '" target="_blank">' . $temp_val . '</a>';
    } elseif ($uitype == 56) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val == 1) {
            $value = 'yes';
        } else {
            $value = 'no';
        }
        //changed by dingjianting on 2006-10-15 for simplized chinese
        if (isset($app_strings[$value])) {
            $value = $app_strings[$value];
        }
    } elseif ($uitype == 51 || $uitype == 73 || $uitype == 50) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getAccountName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 59) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getProductName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 76) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getPotentialName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 80) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getSoName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 1004) {
        $value = $adb->query_result($list_result, $list_result_count, 'smcreatorid');
        $value = getUserName($value);
    } elseif ($uitype == 1007) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = getApproveStatusById($temp_val);
    } elseif ($uitype == 1008) {
        $value = $adb->query_result($list_result, $list_result_count, 'approvedby');
        $value = getUserName($value);
    } elseif ($uitype == 1004) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = getUserName($temp_val);
    } elseif ($uitype == 1007) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val == '1') {
            $value = $app_strings["already_approved"];
        } elseif ($temp_val == '-1') {
//.........这里部分代码省略.........
开发者ID:honj51,项目名称:taobaocrm,代码行数:101,代码来源:ListViewUtils.php


示例5: getOutputHtml


//.........这里部分代码省略.........
            $fieldvalue[] = $value;
        } elseif ($uitype == 76) {
            if ($value != '') {
                $potential_name = getPotentialName($value);
            } elseif (isset($_REQUEST['potential_id']) && $_REQUEST['potential_id'] != '') {
                $value = $_REQUEST['potental_id'];
                $potential_name = getPotentialName($value);
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $potential_name;
            $fieldvalue[] = $value;
        } elseif ($uitype == 78) {
            if ($value != '') {
                $quote_name = getQuoteName($value);
            } elseif (isset($_REQUEST['quote_id']) && $_REQUEST['quote_id'] != '') {
                $value = $_REQUEST['quote_id'];
                $potential_name = getQuoteName($value);
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $quote_name;
            $fieldvalue[] = $value;
        } elseif ($uitype == 79) {
            if ($value != '') {
                $purchaseorder_name = getPoName($value);
            } elseif (isset($_REQUEST['purchaseorder_id']) && $_REQUEST['purchaseorder_id'] != '') {
                $value = $_REQUEST['purchaseorder_id'];
                $purchaseorder_name = getPoName($value);
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $purchaseorder_name;
            $fieldvalue[] = $value;
        } elseif ($uitype == 80) {
            if ($value != '') {
                $salesorder_name = getSoName($value);
            } elseif (isset($_REQUEST['salesorder_id']) && $_REQUEST['salesorder_id'] != '') {
                $value = $_REQUEST['salesorder_id'];
                $salesorder_name = getSoName($value);
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $salesorder_name;
            $fieldvalue[] = $value;
        } elseif ($uitype == 30) {
            $rem_days = 0;
            $rem_hrs = 0;
            $rem_min = 0;
            if ($value != '') {
                $SET_REM = 'CHECKED';
            } else {
                $SET_REM = '';
            }
            $rem_days = floor($col_fields[$fieldname] / (24 * 60));
            $rem_hrs = floor(($col_fields[$fieldname] - $rem_days * 24 * 60) / 60);
            $rem_min = ($col_fields[$fieldname] - $rem_days * 24 * 60) % 60;
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $day_options = getReminderSelectOption(0, 31, 'remdays', $rem_days);
            $hr_options = getReminderSelectOption(0, 23, 'remhrs', $rem_hrs);
            $min_options = getReminderSelectOption(10, 59, 'remmin', $rem_min);
            $fieldvalue[] = array(array(0, 32, 'remdays', getTranslatedString('LBL_DAYS', 'Calendar'), $rem_days), array(0, 24, 'remhrs', getTranslatedString('LBL_HOURS', 'Calendar'), $rem_hrs), array(10, 60, 'remmin', getTranslatedString('LBL_MINUTES', 'Calendar') . '&nbsp;&nbsp;' . getTranslatedString('LBL_BEFORE_EVENT', 'Calendar'), $rem_min));
            $fieldvalue[] = array($SET_REM, getTranslatedString('LBL_YES'), getTranslatedString('LBL_NO'));
            $SET_REM = '';
        } elseif ($uitype == 115) {
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $pick_query = "select * from vtiger_" . $adb->sql_escape_string($fieldname);
            $pickListResult = $adb->pquery($pick_query, array());
            $noofpickrows = $adb->num_rows($pickListResult);
            //Mikecrowe fix to correctly default for custom pick lists
开发者ID:kduqi,项目名称:corebos,代码行数:67,代码来源:EditViewUtils.php


示例6: x0e

 private function x0e($emodule, $efocus, $is_related = false, $is_inventory = false)
 {
     global $x0b, $x0c, $x0d, $x0e, $x0f, $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17, $x18, $x19, $x1a, $x1b, $x1c, $x1d, $x1e, $x1f, $x20, $x21, $x22, $x23, $x24, $x25, $x26;
     $related_fieldnames = array("related_to", "relatedto", "parent_id", "parentid", "product_id", "productid", "service_id", "serviceid", "vendor_id", "product", "account", "invoiceid", "linktoaccountscontacts", "projectid", "sc_related_to");
     if ($is_inventory) {
         $inventory_content = array();
     }
     $tabid = getTabid($emodule);
     if ($is_related) {
         $related = "R_";
     } else {
         $related = "";
     }
     $Checkboxes = array();
     $Picklists = array();
     $Textareas = array();
     $Datefields = array();
     $Multipicklists = array();
     $NumbersField = array();
     $sql = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid = '" . $tabid . "'";
     $result = $this->db->query($sql);
     while ($row = $this->db->fetchByAssoc($result)) {
         if ($row["uitype"] == "19" || $row["uitype"] == "20" || $row["uitype"] == "21" || $row["uitype"] == "24") {
             $Textareas[] = $row["fieldname"];
         } elseif ($row["uitype"] == "5" || $row["uitype"] == "23" || $row["uitype"] == "70") {
             $Datefields[] = $row["fieldname"];
         } elseif ($row["uitype"] == "15" || $row["fieldname"] == "salutationtype") {
             $Picklists[] = $row["fieldname"];
         } elseif ($row["uitype"] == "56") {
             $Checkboxes[] = $row["fieldname"];
         } elseif ($row["uitype"] == "33") {
             $Multipicklists[] = $row["fieldname"];
         } elseif ($row["uitype"] == "71") {
             $NumbersField[] = $row["fieldname"];
         }
     }
     foreach ($efocus->column_fields as $fieldname => $value) {
         if ($fieldname == "assigned_user_id") {
             $value = $this->x19($value);
         } elseif ($fieldname == "account_id") {
             $value = getAccountName($value);
         } elseif ($fieldname == "potential_id") {
             $value = getPotentialName($value);
         } elseif ($fieldname == "contact_id") {
             $value = getContactName($value);
         } elseif ($fieldname == "quote_id") {
             $value = getQuoteName($value);
         } elseif ($fieldname == "salesorder_id") {
             $value = getSoName($value);
         } elseif ($fieldname == "campaignid") {
             $value = getCampaignName($value);
         } elseif ($fieldname == "terms_conditions") {
             $value = $this->x20($value);
         } elseif ($fieldname == "comments") {
             $value = $this->x21($efocus);
         } elseif ($fieldname == "folderid") {
             $value = $this->x22($value);
         } elseif ($x16($fieldname, $related_fieldnames)) {
             if ($value != "") {
                 $parent_module = getSalesEntityType($value);
                 $displayValueArray = getEntityName($parent_module, $value);
                 if (!empty($displayValueArray)) {
                     foreach ($displayValueArray as $key => $p_value) {
                         $value = $p_value;
                     }
                 }
                 if ($fieldname == "invoiceid" && $value == "0") {
                     $value = "";
                 }
             }
         }
         if ($x16($fieldname, $Datefields)) {
             $value = getValidDisplayDate($value);
         } elseif ($x16($fieldname, $Picklists)) {
             if (!$x16($x26($value), $this->ignored_picklist_values)) {
                 $value = $this->x1b($value, $emodule);
             } else {
                 $value = "";
             }
         } elseif ($x16($fieldname, $Checkboxes)) {
             $pdf_app_strings = return_application_language($this->language);
             if ($value == 1) {
                 $value = $pdf_app_strings["yes"];
             } else {
                 $value = $pdf_app_strings["no"];
             }
         } elseif ($x16($fieldname, $Textareas)) {
             $value = $x1a($value);
         } elseif ($x16($fieldname, $Multipicklists)) {
             $value = $x1f(' |##| ', ', ', $value);
         } elseif ($x16($fieldname, $NumbersField)) {
             $value = $this->x1e($value);
         }
         if ($is_inventory) {
             $inventory_content[$x22($emodule . "_" . $fieldname)] = $value;
         } else {
             $this->replacements["\$" . $related . $x22($emodule . "_" . $fieldname) . "\$"] = $value;
         }
     }
     if ($is_inventory) {
//.........这里部分代码省略.........
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:101,代码来源:InventoryPDF.php


示例7: getDetailViewOutputHtml


//.........这里部分代码省略.........
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $account_name;
        $label_fld["secid"] = $account_id;
        $label_fld["link"] = "index.php?module=Accounts&action=DetailView&record=" . $account_id;
    } elseif ($uitype == 52 || $uitype == 77 || $uitype == 101) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $user_id = $col_fields[$fieldname];
        $user_name = getUserName($user_id);
        $label_fld[] = $user_name;
    } elseif ($uitype == 53) {
        $user_id = $col_fields[$fieldname];
        $user_name = getUserName($user_id);
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $user_name;
    } elseif ($uitype == 1004) {
        if (isset($mod_strings[$fieldlabel])) {
            $label_fld[] = $mod_strings[$fieldlabel];
        } else {
            $label_fld[] = $fieldlabel;
        }
        $value = $col_fields[$fieldname];
        $label_fld[] = getUserName($value);
    } elseif ($uitype == 56) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $value = $col_fields[$fieldname];
        if ($value == 1) {
            //Since "yes" is not been translated it is given as app strings here..
            $display_val = $app_strings['yes'];
        } else {
            $display_val = '';
        }
        $label_fld[] = $display_val;
    } elseif ($uitype == 57) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $contact_id = $col_fields[$fieldname];
        $contact_name = "";
        if (trim($contact_id) != '') {
            $contact_name = getContactName($contact_id);
        }
        $label_fld[] = $contact_name;
        $label_fld["secid"] = $contact_id;
        $label_fld["link"] = "index.php?module=Contacts&action=DetailView&record=" . $contact_id;
    } elseif ($uitype == 59) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $product_id = $col_fields[$fieldname];
        if ($product_id != '') {
            $product_name = getProductName($product_id);
        }
        //Account Name View
        $label_fld[] = $product_name;
        $label_fld["secid"] = $product_id;
        $label_fld["link"] = "index.php?module=Products&action=DetailView&record=" . $product_id;
    } elseif ($uitype == 71 || $uitype == 72) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $display_val = $col_fields[$fieldname];
        $label_fld[] = $display_val;
    } elseif ($uitype == 76) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $potential_id = $col_fields[$fieldname];
        if ($potential_id != '') {
            $potential_name = getPotentialName($potential_id);
        }
        $label_fld[] = $potential_name;
        $label_fld["secid"] = $potential_id;
        $label_fld["link"] = "index.php?module=Potentials&action=DetailView&record=" . $potential_id;
    } elseif ($uitype == 80) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $salesorder_id = $col_fields[$fieldname];
        if ($salesorder_id != '') {
            $salesorder_name = getSoName($salesorder_id);
        }
        $label_fld[] = $salesorder_name;
        $label_fld["secid"] = $salesorder_id;
        $label_fld["link"] = "index.php?module=SalesOrder&action=DetailView&record=" . $salesorder_id;
    } elseif ($uitype == 85) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $col_fields[$fieldname];
    } elseif ($uitype == 86) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $col_fields[$fieldname];
    } elseif ($uitype == 87) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $col_fields[$fieldname];
    } elseif ($uitype == 88) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $col_fields[$fieldname];
    } elseif ($uitype == 89) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $col_fields[$fieldname];
    } else {
        $label_fld[] = $mod_strings[$fieldlabel];
        if ($col_fields[$fieldname] == '0') {
            $col_fields[$fieldname] = '';
        }
        $label_fld[] = $col_fields[$fieldname];
    }
    $label_fld[] = $uitype;
    $log->debug("Exiting getDetailViewOutputHtml method ...");
    return $label_fld;
}
开发者ID:Pengzw,项目名称:c3crm,代码行数:101,代码来源:DetailViewUtils.php


示例8: get_invoice_pdf

/**
 * Function to generate Invoice pdf
 */
function get_invoice_pdf()
{
    require_once 'include/tcpdf/pdf.php';
    require_once 'include/tcpdf/pdfconfig.php';
    require_once 'include/database/PearDatabase.php';
    require_once 'modules/Invoice/Invoice.php';
    global $adb, $app_strings, $focus, $current_user;
    // would you like and end page?  1 for yes 0 for no
    $endpage = "1";
    $id = $_REQUEST['record'];
    //retreiving the vtiger_invoice info
    $focus = new Invoice();
    $focus->retrieve_entity_info($_REQUEST['record'], "Invoice");
    $focus->apply_field_security();
    $account_name = getAccountName($focus->column_fields[account_id]);
    $invoice_no = $focus->column_fields[invoice_no];
    $sql = "select currency_symbol from vtiger_currency_info where id=?";
    $result = $adb->pquery($sql, array($focus->column_fields['currency_id']));
    $currency_symbol = $adb->query_result($result, 0, 'currency_symbol');
    // **************** BEGIN POPULATE DATA ********************
    // populate data
    if ($focus->column_fields["salesorder_id"] != '') {
        $so_name = getSoName($focus->column_fields["salesorder_id"]);
    } else {
        $so_name = '';
    }
    $po_name = $focus->column_fields["vtiger_purchaseorder"];
    $valid_till = $focus->column_fields["duedate"];
    $valid_till = getDisplayDate($valid_till);
    $bill_street = $focus->column_fields["bill_street"];
    $bill_city = $focus->column_fields["bill_city"];
    $bill_state = $focus->column_fields["bill_state"];
    $bill_code = $focus->column_fields["bill_code"];
    $bill_country = $focus->column_fields["bill_country"];
    $contact_name = getContactName($focus->column_fields["contact_id"]);
    $ship_street = $focus->column_fields["ship_street"];
    $ship_city = $focus->column_fields["ship_city"];
    $ship_state = $focus->column_fields["ship_state"];
    $ship_code = $focus->column_fields["ship_code"];
    $ship_country = $focus->column_fields["ship_country"];
    $conditions = from_html($focus->column_fields["terms_conditions"]);
    $description = from_html($focus->column_fields["description"]);
    $status = $focus->column_fields["invoicestatus"];
    // Company information
    $add_query = "select * from vtiger_organizationdetails";
    $result = $adb->pquery($add_query, array());
    $num_rows = $adb->num_rows($result);
    if ($num_rows > 0) {
        $org_name = $adb->query_result($result, 0, "organizationname");
        $org_address = $adb->query_result($result, 0, "address");
        $org_city = $adb->query_result($result, 0, "city");
        $org_state = $adb->query_result($result, 0, "state");
        $org_country = $adb->query_result($result, 0, "country");
        $org_code = $adb->query_result($result, 0, "code");
        $org_phone = $adb->query_result($result, 0, "phone");
        $org_fax = $adb->query_result($result, 0, "fax");
        $org_website = $adb->query_result($result, 0, "website");
        $logo_name = $adb->query_result($result, 0, "logoname");
    }
    //NOTE : Removed currency symbols and added with Grand Total text. it is enough to show the currency symbol in one place
    //we can also get the NetTotal, Final Discount Amount/Percent, Adjustment and GrandTotal from the array $associated_products[1]['final_details']
    //get the Associated Products for this Invoice
    $focus->id = $focus->column_fields["record_id"];
    $associated_products = getAssociatedProducts("Invoice", $focus);
    $num_products = count($associated_products);
    //This $final_details array will contain the final total, discount, Group Tax, S&H charge, S&H taxes and adjustment
    $final_details = $associated_products[1]['final_details'];
    //getting the Net Total
    $price_subtotal = number_format($final_details["hdnSubTotal"], 2, '.', ',');
    //Final discount amount/percentage
    $discount_amount = $final_details["discount_amount_final"];
    $discount_percent = $final_details["discount_percentage_final"];
    if ($discount_amount != "") {
        $price_discount = number_format($discount_amount, 2, '.', ',');
    } else {
        if ($discount_percent != "") {
            //This will be displayed near Discount label - used in include/fpdf/templates/body.php
            $final_price_discount_percent = "(" . number_format($discount_percent, 2, '.', ',') . " %)";
            $price_discount = number_format($discount_percent * $final_details["hdnSubTotal"] / 100, 2, '.', ',');
        } else {
            $price_discount = "0.00";
        }
    }
    //Adjustment
    $price_adjustment = number_format($final_details["adjustment"], 2, '.', ',');
    //Grand Total
    $price_total = number_format($final_details["grandTotal"], 2, '.', ',');
    //To calculate the group tax amount
    if ($final_details['taxtype'] == 'group') {
        $group_tax_total = $final_details['tax_totalamount'];
        $price_salestax = number_format($group_tax_total, 2, '.', ',');
        $group_total_tax_percent = '0.00';
        $group_tax_details = $final_details['taxes'];
        for ($i = 0; $i < count($group_tax_details); $i++) {
            $group_total_tax_percent = $group_total_tax_percent + $group_tax_details[$i]['percentage'];
        }
    }
//.........这里部分代码省略.........
开发者ID:hardikk,项目名称:HNH,代码行数:101,代码来源:InventoryPDF.php


示例9: getDetailViewOutputHtml


//.........这里部分代码省略.........
        $label_fld["link"] = "index.php?module=Vendors&action=DetailView&record=" . $vendor_id;
        //$label_fld[] = '<a href="index.php?module=Products&action=VendorDetailView&record='.$vendor_id.'">'.$vendor_name.'</a>';
    } elseif ($uitype == 76) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $potential_id = $col_fields[$fieldname];
        if ($potential_id != '') {
            $potential_name = getPotentialName($potential_id);
        }
        $label_fld[] = $potential_name;
        $label_fld["secid"] = $potential_id;
        $label_fld["link"] = "index.php?module=Potentials&action=DetailView&record=" . $potential_id;
    } elseif ($uitype == 78) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $quote_id = $col_fields[$fieldname];
        if ($quote_id != '') {
            $quote_name = getQuoteName($quote_id);
        }
        $label_fld[] = $quote_name;
        $label_fld["secid"] = $quote_id;
        $label_fld["link"] = "index.php?module=Quotes&action=DetailView&record=" . $quote_id;
    } elseif ($uitype == 79) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $purchaseorder_id = $col_fields[$fieldname];
        if ($purchaseorder_id != '') {
            $purchaseorder_name = getPoName($purchaseorder_id);
        }
        $label_fld[] = $purchaseorder_name;
        $label_fld["secid"] = $purchaseorder_id;
        $label_fld["link"] = "index.php?module=PurchaseOrder&action=DetailView&record=" . $purchaseorder_id;
    } elseif ($uitype == 80) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $salesorder_id = $col_fields[$fieldname];
        if ($salesorder_id != '') {
            $salesorder_name = getSoName($salesorder_id);
        }
        $label_fld[] = $salesorder_name;
        $label_fld["secid"] = $salesorder_id;
        $label_fld["link"] = "index.php?module=SalesOrder&action=DetailView&record=" . $salesorder_id;
    } elseif ($uitype == 1010) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $invoice_id = $col_fields[$fieldname];
        $invoice_name = "";
        if ($invoice_id != '') {
            $invoice_name = getInvoiceName($invoice_id);
        }
        $label_fld[] = $invoice_name;
        $label_fld["secid"] = $invoice_id;
        $label_fld["link"] = "index.php?module=Invoice&action=DetailView&record=" . $invoice_id;
    } elseif ($uitype == 30) {
        $rem_days = 0;
        $rem_hrs = 0;
        $rem_min = 0;
        $reminder_str = "";
        $rem_days = floor($col_fields[$fieldname] / (24 * 60));
        $rem_hrs = floor(($col_fields[$fieldname] - $rem_days * 24 * 60) / 60);
        $rem_min = ($col_fields[$fieldname] - $rem_days * 24 * 60) % 60;
        $label_fld[] = $mod_strings[$fieldlabel];
        if ($col_fields[$fieldname]) {
            $reminder_str = $rem_days . '&nbsp;' . $mod_strings['LBL_DAYS'] . '&nbsp;' . $rem_hrs . '&nbsp;' . $mod_strings['LBL_HOURS'] . '&nbsp;' . $rem_min . '&nbsp;' . $mod_strings['LBL_MINUTES'] . '&nbsp;&nbsp;' . $mod_strings['LBL_BEFORE_EVENT'];
        }
        $label_fld[] = '&nbsp;' . $reminder_str;
    } elseif ($uitype == 85) {
        $label_fld[] = $mod_strings[$fieldlabel];
        $label_fld[] = $col_fields[$fieldname];
    } elseif ($uitype == 86) {
        $label_fld[] = $mod_strings[$fieldlabel];
开发者ID:honj51,项目名称:taobaocrm,代码行数:67,代码来源:DetailViewUtils.php


示例10: getDetailViewOutputHtml


//.........这里部分代码省略.........
            $label_fld["secid"] = $vendor_id;
            $label_fld["link"] = "index.php?module=Vendors&action=DetailView&record=" . $vendor_id;
        } elseif ($uitype == 76) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $potential_id = $col_fields[$fieldname];
            if ($potential_id != '') {
                $potential_name = getPotentialName($potential_id);
            }
            $label_fld[] = $potential_name;
            $label_fld["secid"] = $potential_id;
            $label_fld["link"] = "index.php?module=Potentials&action=DetailView&record=" . $potential_id;
        } elseif ($uitype == 78) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $quote_id = $col_fields[$fieldname];
            if ($quote_id != '') {
                $quote_name = getQuoteName($quote_id);
            }
            $label_fld[] = $quote_name;
            $label_fld["secid"] = $quote_id;
            $label_fld["link"] = "index.php?module=Quotes&action=DetailView&record=" . $quote_id;
        } elseif ($uitype == 79) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $purchaseorder_id = $col_fields[$fieldname];
            if ($purchaseorder_id != '') {
                $purchaseorder_name = getPoName($purchaseorder_id);
            }
            $label_fld[] = $purchaseorder_name;
            $label_fld["secid"] = $purchaseorder_id;
            $label_fld["link"] = "index.php?module=PurchaseOrder&action=DetailView&record=" . $purchaseorder_id;
        } elseif ($uitype == 80) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $salesorder_id = $col_fields[$fieldname];
            if ($salesorder_id != '') {
                $salesorder_name = getSoName($salesorder_id);
            }
            $label_fld[] = $salesorder_name;
            $label_fld["secid"] = $salesorder_id;
            $label_fld["link"] = "index.php?module=SalesOrder&action=DetailView&record=" . $salesorder_id;
        } elseif ($uitype == 30) {
            $rem_days = 0;
            $rem_hrs = 0;
            $rem_min = 0;
            $reminder_str = "";
            $rem_days = floor($col_fields[$fieldname] / (24 * 60));
            $rem_hrs = floor(($col_fields[$fieldname] - $rem_days * 24 * 60) / 60);
            $rem_min = ($col_fields[$fieldname] - $rem_days * 24 * 60) % 60;
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            if ($col_fields[$fieldname]) {
                $reminder_str = $rem_days . '&nbsp;' . $mod_strings['LBL_DAYS'] . '&nbsp;' . $rem_hrs . '&nbsp;' . $mod_strings['LBL_HOURS'] . '&nbsp;' . $rem_min . '&nbsp;' . $mod_strings['LBL_MINUTES'] . '&nbsp;&nbsp;' . $mod_strings['LBL_BEFORE_EVENT'];
            }
            $label_fld[] = '&nbsp;' . $reminder_str;
        } elseif ($uitype == 98) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            if (is_admin($current_user)) {
                $label_fld[] = '<a href="index.php?module=Settings&action=RoleDetailView&roleid=' . $col_fields[$fieldname] . '">' . getRoleName($col_fields[$fieldname]) . '</a>';
            } else {
                $label_fld[] = getRoleName($col_fields[$fieldname]);
            }
        } elseif ($uitype == 85) {
            //Added for Skype by Minnie
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $label_fld[] = $col_fields[$fieldname];
        } elseif ($uitype == 26) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $query = "select foldername from vtiger_attachmentsfolder where folderid = ?";
            $result = $adb->pquery($query, array($col_fields[$fieldname]));
开发者ID:jaimeaga84,项目名称:corebos,代码行数:67,代码来源:DetailViewUtils.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getSonsOf函数代码示例发布时间:2022-05-15
下一篇:
PHP getSnippetContent函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap