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


PHP CurrencyField::getCurrencySymbol方法代码示例

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


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

示例1: getFldFormatedValue


//.........这里部分代码省略.........
                 if (!in_array($fld_alias, $this->g_flds)) {
                     $date = new DateTimeField($trimed_fld_value);
                     $fld_value = $date->getDisplayDate();
                 }
                 break;
             case "6":
                 if (!in_array($fld_alias, $this->g_flds)) {
                     $date = new DateTimeField($trimed_fld_value);
                     $fld_value = $date->getDisplayDate();
                 }
                 break;
             case "23":
                 if (!in_array($fld_alias, $this->g_flds)) {
                     $date = new DateTimeField($trimed_fld_value);
                     $fld_value = $date->getDisplayDate();
                 }
                 break;
             case "70":
                 if (!in_array($fld_alias, $this->g_flds)) {
                     $date = new DateTimeField($trimed_fld_value);
                     $fld_value = $date->getDisplayDate();
                 }
                 break;
             case "71":
                 if ($trimed_fld_value == "-") {
                     $trimed_fld_value = 0;
                 }
                 $fld_value = number_format($trimed_fld_value, "3", ".", "");
                 $currencyField = new CurrencyField($fld_value);
                 $fld_value = $currencyField->getDisplayValue(null, true);
                 if ($currency_id != "" && isset($this->currency_symbols[$currency_id])) {
                     $fld_value = CurrencyField::appendCurrencySymbol($fld_value, $this->currency_symbols[$currency_id]);
                 } else {
                     $currencySymbol = $currencyField->getCurrencySymbol();
                     $fld_value = CurrencyField::appendCurrencySymbol($fld_value, $currencySymbol);
                 }
                 break;
             case "72":
                 if ($trimed_fld_value == "-") {
                     $trimed_fld_value = 0;
                 }
                 $fld_value = number_format($trimed_fld_value, "3", ".", "");
                 $currencyField = new CurrencyField($fld_value);
                 $fld_value = $currencyField->getDisplayValue(null, true);
                 if ($currency_id != "" && isset($this->currency_symbols[$currency_id])) {
                     $fld_value = CurrencyField::appendCurrencySymbol($fld_value, $this->currency_symbols[$currency_id]);
                 } else {
                     $currencySymbol = $currencyField->getCurrencySymbol();
                     $fld_value = CurrencyField::appendCurrencySymbol($fld_value, $currencySymbol);
                 }
                 break;
             case "75":
                 if (is_numeric($trimed_fld_value)) {
                     $parent_module = getSalesEntityType($trimed_fld_value);
                     if (vtlib_isModuleActive($parent_module)) {
                         $displayValueArray = getEntityName($parent_module, $trimed_fld_value);
                         if (!empty($displayValueArray)) {
                             foreach ($displayValueArray as $key => $value) {
                                 $displayValue = $value;
                             }
                         }
                         if ($skip_format === true) {
                             $fld_value = $displayValue;
                         } else {
                             $fld_value = "<a href='index.php?module={$parent_module}&view=Detail&record={$trimed_fld_value}' >{$displayValue}</a>";
                             //$fld_value = "<a href='index.php?module=$parent_module&action=DetailView&record=$trimed_fld_value' >$displayValue</a>";
开发者ID:cin-system,项目名称:cinrepo,代码行数:67,代码来源:GenerateObj.php

示例2: getOutputHtml


//.........这里部分代码省略.........
            $editview_label[2] = array();
            if (vtlib_isModuleActive('Accounts')) {
                array_push($editview_label[0], $app_strings['COMBO_ACCOUNTS']);
                array_push($editview_label[1], $account_selected);
                array_push($editview_label[2], "Accounts");
            }
            if (vtlib_isModuleActive('Contacts')) {
                array_push($editview_label[0], $app_strings['COMBO_CONTACTS']);
                array_push($editview_label[1], $contact_selected);
                array_push($editview_label[2], "Contacts");
            }
            $fieldvalue[] = $parent_name;
            $fieldvalue[] = $value;
        } elseif ($uitype == 9 || $uitype == 7) {
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fldrs = $adb->pquery('select typeofdata from vtiger_field
			where vtiger_field.fieldname=? and vtiger_field.tabid=?', array($fieldname, getTabid($module_name)));
            $typeofdata = $adb->query_result($fldrs, 0, 0);
            $typeinfo = explode('~', $typeofdata);
            if ($typeinfo[0] == 'I') {
                $fieldvalue[] = $value;
            } else {
                $currencyField = new CurrencyField($value);
                $decimals = CurrencyField::getDecimalsFromTypeOfData($typeofdata);
                $currencyField->initialize($current_user);
                $currencyField->setNumberofDecimals(min($decimals, $currencyField->getCurrencyDecimalPlaces()));
                $fieldvalue[] = $currencyField->getDisplayValue(null, false, true);
            }
        } elseif ($uitype == 71 || $uitype == 72) {
            $currencyField = new CurrencyField($value);
            // Some of the currency fields like Unit Price, Total, Sub-total etc of Inventory modules, do not need currency conversion
            if ($col_fields['record_id'] != '' && $uitype == 72) {
                if ($fieldname == 'unit_price') {
                    $rate_symbol = getCurrencySymbolandCRate(getProductBaseCurrency($col_fields['record_id'], $module_name));
                    $currencySymbol = $rate_symbol['symbol'];
                } else {
                    $currency_info = getInventoryCurrencyInfo($module, $col_fields['record_id']);
                    $currencySymbol = $currency_info['currency_symbol'];
                }
                $fieldvalue[] = $currencyField->getDisplayValue(null, true);
            } else {
                $decimals = CurrencyField::getDecimalsFromTypeOfData($typeofdata);
                $currencyField->initialize($current_user);
                $currencyField->setNumberofDecimals(min($decimals, $currencyField->getCurrencyDecimalPlaces()));
                $fieldvalue[] = $currencyField->getDisplayValue(null, false, true);
                $currencySymbol = $currencyField->getCurrencySymbol();
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name) . ': (' . $currencySymbol . ')';
        } elseif ($uitype == 75 || $uitype == 81) {
            if ($value != '') {
                $vendor_name = getVendorName($value);
            } elseif (isset($_REQUEST['vendor_id']) && $_REQUEST['vendor_id'] != '') {
                $value = $_REQUEST['vendor_id'];
                $vendor_name = getVendorName($value);
            }
            $pop_type = 'specific';
            if ($uitype == 81) {
                $pop_type = 'specific_vendor_address';
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $vendor_name;
            $fieldvalue[] = $value;
        } elseif ($uitype == 76) {
            if ($value != '') {
                $potential_name = getPotentialName($value);
            } elseif (isset($_REQUEST['potential_id']) && $_REQUEST['potential_id'] != '') {
开发者ID:kduqi,项目名称:corebos,代码行数:67,代码来源:EditViewUtils.php

示例3: getDetailViewOutputHtml


//.........这里部分代码省略.........
                        $date = new DateTimeField($col_fields[$fieldname]);
                    }
                    $displayValue = $date->getDisplayDateTimeValue();
                }
            }
            $label_fld[] = $displayValue;
        } elseif ($uitype == 5 || $uitype == 23 || $uitype == 70) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $dateValue = $col_fields[$fieldname];
            if ($col_fields['time_end'] != '' && ($tabid == 9 || $tabid == 16) && $uitype == 23) {
                $end_time = $col_fields['time_end'];
            }
            if ($dateValue == '0000-00-00' || empty($dateValue)) {
                $displayValue = '';
            } else {
                if (empty($end_time) && strpos($dateValue, ' ') == false) {
                    $displayValue = DateTimeField::convertToUserFormat($col_fields[$fieldname]);
                } else {
                    if (!empty($end_time)) {
                        $date = new DateTimeField($col_fields[$fieldname] . ' ' . $end_time);
                    } else {
                        $date = new DateTimeField($col_fields[$fieldname]);
                    }
                    $displayValue = $date->getDisplayDateTimeValue();
                }
            }
            $label_fld[] = $displayValue;
        } elseif ($uitype == 71 || $uitype == 72) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $currencyField = new CurrencyField($col_fields[$fieldname]);
            if ($uitype == 72) {
                // Some of the currency fields like Unit Price, Total, Sub-total etc of Inventory modules, do not need currency conversion
                if ($fieldname == 'unit_price') {
                    $rate_symbol = getCurrencySymbolandCRate(getProductBaseCurrency($col_fields['record_id'], $module));
                    $label_fld[] = $currencyField->getDisplayValue(null, true);
                    $label_fld["cursymb"] = $rate_symbol['symbol'];
                } else {
                    $currency_info = getInventoryCurrencyInfo($module, $col_fields['record_id']);
                    $label_fld[] = $currencyField->getDisplayValue(null, true);
                    $label_fld["cursymb"] = $currency_info['currency_symbol'];
                }
            } else {
                $label_fld[] = $currencyField->getDisplayValue();
                $label_fld["cursymb"] = $currencyField->getCurrencySymbol();
            }
        } elseif ($uitype == 75 || $uitype == 81) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $vendor_id = $col_fields[$fieldname];
            if ($vendor_id != '') {
                $vendor_name = getVendorName($vendor_id);
            }
            $label_fld[] = $vendor_name;
            $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];
开发者ID:jaimeaga84,项目名称:corebos,代码行数:67,代码来源:DetailViewUtils.php


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