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

PHP getTranslatedCurrencyString函数代码示例

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

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



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

示例1: x2f

 private function x2f($x0c, $x0e, $x94 = 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;
     if (!isset(self::$x22[$x0c])) {
         $this->x2e($x0c, $x0e);
     }
     if (!isset(self::$x22[$x0c])) {
         return array();
     }
     $x13e = "";
     if ($x94 !== false) {
         $x13e = "R_" . $x175($x94) . "_";
     }
     self::$x21["\$" . $x13e . "SUBTOTAL\$"] = $this->x23($x0e->column_fields["hdnSubTotal"]);
     self::$x21["\$" . $x13e . "TOTAL\$"] = $this->x23($x0e->column_fields["hdnGrandTotal"]);
     $xf9 = $this->x21($x0c, $x0e);
     $xf9["currency_symbol"] = $x172("тя┐╜м", "€", $xf9["currency_symbol"]);
     $xf9["currency_symbol"] = $x172("┬┬г", "£", $xf9["currency_symbol"]);
     self::$x21["\$" . $x13e . "CURRENCYNAME\$"] = getTranslatedCurrencyString($xf9["currency_name"]);
     self::$x21["\$" . $x13e . "CURRENCYSYMBOL\$"] = $xf9["currency_symbol"];
     self::$x21["\$" . $x13e . "CURRENCYCODE\$"] = $xf9["currency_code"];
     self::$x21["\$" . $x13e . "ADJUSTMENT\$"] = $this->x23($x0e->column_fields["txtAdjustment"]);
     $x6f = $this->x18($x0c, $x0e);
     self::$x21["\$" . $x13e . "TOTALWITHOUTVAT\$"] = $x6f["TOTAL"]["TOTALWITHOUTVAT"];
     self::$x21["\$" . $x13e . "VAT\$"] = $x6f["TOTAL"]["TAXTOTAL"];
     self::$x21["\$" . $x13e . "VATPERCENT\$"] = $x6f["TOTAL"]["TAXTOTALPERCENT"];
     self::$x21["\$" . $x13e . "TOTALWITHVAT\$"] = $x6f["TOTAL"]["TOTALWITHVAT"];
     self::$x21["\$" . $x13e . "SHTAXAMOUNT\$"] = $x6f["TOTAL"]["SHTAXAMOUNT"];
     self::$x21["\$" . $x13e . "SHTAXTOTAL\$"] = $x6f["TOTAL"]["SHTAXTOTAL"];
     self::$x21["\$" . $x13e . "TOTALDISCOUNT\$"] = $x6f["TOTAL"]["FINALDISCOUNT"];
     self::$x21["\$" . $x13e . "TOTALDISCOUNTPERCENT\$"] = $x6f["TOTAL"]["FINALDISCOUNTPERCENT"];
     self::$x21["\$" . $x13e . "TOTALAFTERDISCOUNT\$"] = $x6f["TOTAL"]["TOTALAFTERDISCOUNT"];
     $this->x15();
     if ($x94 === false) {
         if ($x161($x6f["TOTAL"]["VATBLOCK"]) > 0) {
             $x14d = "<table border='1' style='border-collapse:collapse;' cellpadding='3'>";
             $x14d .= "<tr>\r\n                                <td nowrap align='center'>" . vtranslate("Name") . "</td>\n\n                                <td nowrap align='center'>" . self::$x10["LBL_VATBLOCK_VAT_PERCENT"] . "</td>\r\n                                <td nowrap align='center'>" . self::$x10["LBL_VATBLOCK_SUM"] . " (" . $xf9["currency_symbol"] . ")" . "</td>\r\n                                <td nowrap align='center'>" . self::$x10["LBL_VATBLOCK_VAT_VALUE"] . " (" . $xf9["currency_symbol"] . ")" . "</td>\r\n                              </tr>";
             foreach ($x6f["TOTAL"]["VATBLOCK"] as $x14e => $x14f) {
                 if ($x14f["netto"] != 0) {
                     $x14d .= "<tr>\n                                        <td nowrap align='left' width='20%'>" . $x14f["label"] . "</td>\n\n                        \t\t\t\t<td nowrap align='right' width='25%'>" . $this->x23($x14f["value"]) . " %</td>\r\n                                        <td nowrap align='right' width='30%'>" . $this->x23($x14f["netto"]) . "</td>\r\n                                        <td nowrap align='right' width='25%'>" . $this->x23($x14f["vat"]) . "</td>\r\n                                      </tr>";
                 }
             }
             $x14d .= "</table>";
         } else {
             $x14d = "";
         }
         self::$x21["\$" . "VATBLOCK\$"] = $x14d;
         $this->x15();
         if ($x176(self::$x1c, "#VATBLOCK_START#") !== false && $x176(self::$x1c, "#VATBLOCK_END#") !== false) {
             $this->x29();
             $x150 = array();
             $x151 = $x163("#VATBLOCK_START#", self::$x1c);
             $x150[] = $x151[0];
             for ($x79 = 1; $x79 < $x161($x151); $x79++) {
                 $x152 = $x163("#VATBLOCK_END#", $x151[$x79]);
                 foreach ($x152 as $x153) {
                     $x150[] = $x153;
                 }
                 $x154 = $x79 * 2 - 1;
                 $x155[$x154] = $x150[$x154];
                 $x150[$x154] = '';
             }
             if ($x161($x6f["TOTAL"]["VATBLOCK"]) > 0) {
                 foreach ($x6f["TOTAL"]["VATBLOCK"] as $x14e => $x14f) {
                     foreach ($x155 as $x7f => $x80) {
                         if ($x14f["netto"] != 0) {
                             foreach ($x14f as $x156 => $x157) {
                                 if ($x16a($x157)) {
                                     $x157 = $this->x23($x157);
                                 }
                                 $x80 = $x172("\$" . "VATBLOCK_" . $x175($x156) . "\$", $x157, $x80);
                             }
                             $x150[$x7f] .= $x80;
                         }
                     }
                 }
             }
             self::$x1c = $x167('', $x150);
         }
     }
     return $x6f;
 }
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:82,代码来源:PDFContent.php


示例2: content_5674dd1390175


//.........这里部分代码省略.........
        echo vtranslate('LBL_ALL_FIELDS_BELOW_ARE_REQUIRED', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</label><?php 
        if ($_smarty_tpl->tpl_vars['IS_FIRST_USER']->value) {
            ?>
<div class="controls" id="currency_name_controls"><select name="currency_name" id="currency_name" placeholder="<?php 
            echo vtranslate('LBL_BASE_CURRENCY', $_smarty_tpl->tpl_vars['MODULE']->value);
            ?>
" data-errormessage="<?php 
            echo vtranslate('LBL_CHOOSE_BASE_CURRENCY', $_smarty_tpl->tpl_vars['MODULE']->value);
            ?>
" class="validate[required]" style="width:250px;"><option value=""></option><?php 
            $_smarty_tpl->tpl_vars['currency'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['currency']->_loop = false;
            $_smarty_tpl->tpl_vars['header'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['CURRENCIES']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['currency']->key => $_smarty_tpl->tpl_vars['currency']->value) {
                $_smarty_tpl->tpl_vars['currency']->_loop = true;
                $_smarty_tpl->tpl_vars['header']->value = $_smarty_tpl->tpl_vars['currency']->key;
                ?>
<!--Open source fix to select user preferred currency during installation --><option value="<?php 
                echo $_smarty_tpl->tpl_vars['header']->value;
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['header']->value == $_smarty_tpl->tpl_vars['CURRENT_USER_MODEL']->value->get('currency_name')) {
                    ?>
selected<?php 
                }
                ?>
><?php 
                echo getTranslatedCurrencyString($_smarty_tpl->tpl_vars['header']->value);
                ?>
(<?php 
                echo $_smarty_tpl->tpl_vars['currency']->value[1];
                ?>
)</option><?php 
            }
            ?>
</select>&nbsp;<span rel="tooltip" title="<?php 
            echo vtranslate('LBL_OPERATING_CURRENCY', $_smarty_tpl->tpl_vars['MODULE']->value);
            ?>
" id="currency_name_tooltip" class="icon-info-sign"></span><div style="padding-top:10px;"></div></div><?php 
        }
        ?>
<div class="controls"><select name="lang_name" id="lang_name" style="width:250px;" placeholder="<?php 
        echo vtranslate('LBL_LANGUAGE', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
" data-errormessage="<?php 
        echo vtranslate('LBL_CHOOSE_LANGUAGE', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
" class="validate[required]"><option value=""></option><?php 
        $_smarty_tpl->tpl_vars['language'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['language']->_loop = false;
        $_smarty_tpl->tpl_vars['header'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['LANGUAGES']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['language']->key => $_smarty_tpl->tpl_vars['language']->value) {
            $_smarty_tpl->tpl_vars['language']->_loop = true;
            $_smarty_tpl->tpl_vars['header']->value = $_smarty_tpl->tpl_vars['language']->key;
            ?>
<option value="<?php 
开发者ID:wsLapshin,项目名称:charter_crm,代码行数:67,代码来源:0b833920fe3d320a45034786c98c56828fa18816.file.UserSetup.tpl.php


示例3: getTranslatedCurrencyString

					<td width="50%" class="cellLabel small"><b>' . $mod_strings['LBL_CURRDEL'] . '</b></td>
					<td width="50%" class="cellText small"><b>' . getTranslatedCurrencyString($delete_currencyname) . '</b></td>
				</tr>
				<tr>
					<td class="cellLabel small"><b>' . $mod_strings['LBL_TRANSCURR'] . '</b></td>
					<td class="cellText small">';
$output .= '<select class="select small" name="transfer_currency_id" id="transfer_currency_id">';
global $adb;
$sql = "select * from vtiger_currency_info where currency_status = ? and deleted=0";
$result = $adb->pquery($sql, array('Active'));
$temprow = $adb->fetch_array($result);
do {
    $currencyname = $temprow["currency_name"];
    $currencyid = $temprow["id"];
    if ($delete_currency_id != $currencyid) {
        $output .= '<option value="' . $currencyid . '">' . getTranslatedCurrencyString($currencyname) . '</option>';
    }
} while ($temprow = $adb->fetch_array($result));
$output .= '</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport">
	<tr>
		<td align="center"><input type="button" onclick="transferCurrency(' . $delete_currency_id . ')" name="Delete" value="' . $app_strings["LBL_SAVE_BUTTON_LABEL"] . '" class="crmbutton small save">
		</td>
	</tr>
</table>
</form></div>';
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:CurrencyDeleteStep1.php


示例4: getPDFMakerFieldValue

 public function getPDFMakerFieldValue($report, $picklistArray, $dbField, $valueArray, $fieldName)
 {
     global $current_user, $default_charset;
     $db = PearDatabase::getInstance();
     $value = $valueArray[$fieldName];
     $fld_type = $dbField->type;
     list($module, $fieldLabel) = explode('_', $dbField->name, 2);
     $fieldInfo = $this->getFieldByPDFMakerLabel($module, $fieldLabel);
     $fieldType = null;
     $fieldvalue = $value;
     if (!empty($fieldInfo)) {
         $field = WebserviceField::fromArray($db, $fieldInfo);
         $fieldType = $field->getFieldDataType();
     }
     if ($fieldType == 'currency' && $value != '') {
         // Some of the currency fields like Unit Price, Total, Sub-total etc of Inventory modules, do not need currency conversion
         if ($field->getUIType() == '72') {
             $curid_value = explode("::", $value);
             $currency_id = $curid_value[0];
             $currency_value = $curid_value[1];
             $cur_sym_rate = getCurrencySymbolandCRate($currency_id);
             if ($value != '') {
                 if ($dbField->name == 'Products_Unit_Price') {
                     // need to do this only for Products Unit Price
                     if ($currency_id != 1) {
                         $currency_value = (double) $cur_sym_rate['rate'] * (double) $currency_value;
                     }
                 }
                 $formattedCurrencyValue = CurrencyField::convertToUserFormat($currency_value, null, true);
                 $fieldvalue = CurrencyField::appendCurrencySymbol($formattedCurrencyValue, $cur_sym_rate['symbol']);
             }
         } else {
             $currencyField = new CurrencyField($value);
             $fieldvalue = $currencyField->getDisplayValue();
         }
     } elseif ($dbField->name == "PurchaseOrder_Currency" || $dbField->name == "SalesOrder_Currency" || $dbField->name == "Invoice_Currency" || $dbField->name == "Quotes_Currency" || $dbField->name == "PriceBooks_Currency") {
         if ($value != '') {
             $fieldvalue = getTranslatedCurrencyString($value);
         }
     } elseif (in_array($dbField->name, $this->ui101_fields) && !empty($value)) {
         $entityNames = getEntityName('Users', $value);
         $fieldvalue = $entityNames[$value];
     } elseif ($fieldType == 'date' && !empty($value)) {
         if ($module == 'Calendar' && $field->getFieldName() == 'due_date') {
             $endTime = $valueArray['calendar_end_time'];
             if (empty($endTime)) {
                 $recordId = $valueArray['calendar_id'];
                 $endTime = getSingleFieldValue('vtiger_activity', 'time_end', 'activityid', $recordId);
             }
             $date = new DateTimeField($value . ' ' . $endTime);
             $fieldvalue = $date->getDisplayDate();
         } else {
             $fieldvalue = DateTimeField::convertToUserFormat($value);
         }
     } elseif ($fieldType == "datetime" && !empty($value)) {
         $date = new DateTimeField($value);
         $fieldvalue = $date->getDisplayDateTimeValue();
     } elseif ($fieldType == 'time' && !empty($value) && $field->getFieldName() != 'duration_hours') {
         if ($field->getFieldName() == "time_start" || $field->getFieldName() == "time_end") {
             $date = new DateTimeField($value);
             $fieldvalue = $date->getDisplayTime();
         } else {
             $fieldvalue = $value;
         }
     } elseif ($fieldType == "picklist" && !empty($value)) {
         if (is_array($picklistArray)) {
             if (is_array($picklistArray[$dbField->name]) && $field->getFieldName() != 'activitytype' && !in_array($value, $picklistArray[$dbField->name])) {
                 $fieldvalue = $app_strings['LBL_NOT_ACCESSIBLE'];
             } else {
                 $fieldvalue = $this->getTranslatedString($value, $module);
             }
         } else {
             $fieldvalue = $this->getTranslatedString($value, $module);
         }
     } elseif ($fieldType == "multipicklist" && !empty($value)) {
         if (is_array($picklistArray[1])) {
             $valueList = explode(' |##| ', $value);
             $translatedValueList = array();
             foreach ($valueList as $value) {
                 if (is_array($picklistArray[1][$dbField->name]) && !in_array($value, $picklistArray[1][$dbField->name])) {
                     $translatedValueList[] = $app_strings['LBL_NOT_ACCESSIBLE'];
                 } else {
                     $translatedValueList[] = $this->getTranslatedString($value, $module);
                 }
             }
         }
         if (!is_array($picklistArray[1]) || !is_array($picklistArray[1][$dbField->name])) {
             $fieldvalue = str_replace(' |##| ', ', ', $value);
         } else {
             implode(', ', $translatedValueList);
         }
     } elseif ($fieldType == 'double') {
         if ($current_user->truncate_trailing_zeros == true) {
             $fieldvalue = decimalFormat($fieldvalue);
         }
     }
     if ($fieldvalue == "") {
         return "-";
     }
     $fieldvalue = str_replace("<", "&lt;", $fieldvalue);
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:RelBlockRun.php


示例5: getDetailAssociatedProducts

/** This function returns a HTML output of associated vtiger_products for a given entity (Quotes,Invoice,Sales order or Purchase order)
 * Param $module - module name
 * Param $focus - module object
 * Return type string
 */
function getDetailAssociatedProducts($module, $focus)
{
    global $log;
    $log->debug("Entering getDetailAssociatedProducts(" . $module . "," . get_class($focus) . ") method ...");
    global $adb;
    global $mod_strings;
    global $theme;
    global $log;
    global $app_strings, $current_user;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    if (vtlib_isModuleActive("Products")) {
        $hide_stock = 'no';
    } else {
        $hide_stock = 'yes';
    }
    if ($module != 'PurchaseOrder') {
        if (GlobalVariable::getVariable('B2B', '1') == '1') {
            $acvid = $focus->column_fields['account_id'];
        } else {
            $acvid = $focus->column_fields['contact_id'];
        }
        if ($hide_stock == 'no') {
            $colspan = '2';
        } else {
            $colspan = '1';
        }
    } else {
        $acvid = $focus->column_fields['vendor_id'];
        $colspan = '1';
    }
    //Get the taxtype of this entity
    $taxtype = getInventoryTaxType($module, $focus->id);
    $currencytype = getInventoryCurrencyInfo($module, $focus->id);
    $output = '';
    //Header Rows
    $output .= '

	<table width="100%"  border="0" align="center" cellpadding="5" cellspacing="0" class="crmTable" id="proTab">
	   <tr valign="top">
	   	<td colspan="' . $colspan . '" class="dvInnerHeader"><b>' . $app_strings['LBL_ITEM_DETAILS'] . '</b></td>
		<td class="dvInnerHeader" align="center" colspan="2"><b>' . $app_strings['LBL_CURRENCY'] . ' : </b>' . getTranslatedCurrencyString($currencytype['currency_name']) . ' (' . $currencytype['currency_symbol'] . ')
		</td>
		<td class="dvInnerHeader" align="center" colspan="2"><b>' . $app_strings['LBL_TAX_MODE'] . ' : </b>' . $app_strings[$taxtype] . '
		</td>
	   </tr>
	   <tr valign="top">
		<td width=40% class="lvtCol"><font color="red">*</font>
			<b>' . $app_strings['LBL_ITEM_NAME'] . '</b>
		</td>';
    //Add Quantity in Stock column for SO, Quotes and Invoice
    if (($module == 'Quotes' || $module == 'SalesOrder' || $module == 'Invoice') && $hide_stock == 'no') {
        $output .= '<td width=10% class="lvtCol"><b>' . $app_strings['LBL_QTY_IN_STOCK'] . '</b></td>';
    }
    $output .= '

		<td width=10% class="lvtCol"><b>' . $app_strings['LBL_QTY'] . '</b></td>
		<td width=10% class="lvtCol" align="right"><b>' . $app_strings['LBL_LIST_PRICE'] . '</b></td>
		<td width=12% nowrap class="lvtCol" align="right"><b>' . $app_strings['LBL_TOTAL'] . '</b></td>
		<td width=13% valign="top" class="lvtCol" align="right"><b>' . $app_strings['LBL_NET_PRICE'] . '</b></td>
	   </tr>
	   	';
    // DG 15 Aug 2006
    // Add "ORDER BY sequence_no" to retain add order on all inventoryproductrel items
    if ($module == 'Quotes' || $module == 'PurchaseOrder' || $module == 'SalesOrder' || $module == 'Invoice') {
        $query = "select case when vtiger_products.productid != '' then vtiger_products.productname else vtiger_service.servicename end as productname," . " case when vtiger_products.productid != '' then 'Products' else 'Services' end as entitytype," . " case when vtiger_products.productid != '' then vtiger_products.unit_price else vtiger_service.unit_price end as unit_price," . " case when vtiger_products.productid != '' then vtiger_products.qtyinstock else 'NA' end as qtyinstock, vtiger_inventoryproductrel.* " . " from vtiger_inventoryproductrel" . " left join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid " . " left join vtiger_service on vtiger_service.serviceid=vtiger_inventoryproductrel.productid " . " where id=? ORDER BY sequence_no";
    }
    $result = $adb->pquery($query, array($focus->id));
    $num_rows = $adb->num_rows($result);
    $netTotal = '0.00';
    for ($i = 1; $i <= $num_rows; $i++) {
        $sub_prod_query = $adb->pquery("SELECT productid from vtiger_inventorysubproductrel WHERE id=? AND sequence_no=?", array($focus->id, $i));
        $subprodname_str = '';
        if ($adb->num_rows($sub_prod_query) > 0) {
            for ($j = 0; $j < $adb->num_rows($sub_prod_query); $j++) {
                $sprod_id = $adb->query_result($sub_prod_query, $j, 'productid');
                $sprod_name = getProductName($sprod_id);
                $str_sep = "";
                if ($j > 0) {
                    $str_sep = ":";
                }
                $subprodname_str .= $str_sep . " - " . $sprod_name;
            }
        }
        $subprodname_str = str_replace(":", "<br>", $subprodname_str);
        $productid = $adb->query_result($result, $i - 1, 'productid');
        $entitytype = $adb->query_result($result, $i - 1, 'entitytype');
        $productname = $adb->query_result($result, $i - 1, 'productname');
        $productname = '<a href="index.php?action=DetailView&record=' . $productid . '&module=' . $entitytype . '">' . $productname . '</a>';
        if ($subprodname_str != '') {
            $productname .= "<br/><span style='color:#C0C0C0;font-style:italic;'>" . $subprodname_str . "</span>";
        }
        $comment = $adb->query_result($result, $i - 1, 'comment');
        $qtyinstock = $adb->query_result($result, $i - 1, 'qtyinstock');
        $qty = $adb->query_result($result, $i - 1, 'quantity');
//.........这里部分代码省略.........
开发者ID:jaimeaga84,项目名称:corebos,代码行数:101,代码来源:DetailViewUtils.php


示例6: getReportFieldValue

/**
 *
 * @global Users $current_user
 * @param ReportRun $report
 * @param Array $picklistArray
 * @param ADOFieldObject $dbField
 * @param Array $valueArray
 * @param String $fieldName
 * @return String
 */
function getReportFieldValue($report, $picklistArray, $dbField, $valueArray, $fieldName)
{
    global $current_user, $default_charset;
    $db = PearDatabase::getInstance();
    $value = $valueArray[$fieldName];
    $fld_type = $dbField->type;
    list($module, $fieldLabel) = explode('__', $dbField->name, 2);
    $fieldInfo = getFieldByReportLabel($module, $fieldLabel);
    $fieldType = null;
    $fieldvalue = $value;
    if (!empty($fieldInfo)) {
        $field = WebserviceField::fromArray($db, $fieldInfo);
        $fieldType = $field->getFieldDataType();
    }
    if ($fieldType == 'currency' && $value != '') {
        // Some of the currency fields like Unit Price, Total, Sub-total etc of Inventory modules, do not need currency conversion
        if ($field->getUIType() == '72') {
            $curid_value = explode("::", $value);
            $currency_id = $curid_value[0];
            $currency_value = $curid_value[1];
            $cur_sym_rate = getCurrencySymbolandCRate($currency_id);
            if ($value != '') {
                if ($dbField->name == 'Products_Unit_Price') {
                    // need to do this only for Products Unit Price
                    if ($currency_id != 1) {
                        $currency_value = (double) $cur_sym_rate['rate'] * (double) $currency_value;
                    }
                }
                $formattedCurrencyValue = CurrencyField::convertToUserFormat($currency_value, null, true);
                $fieldvalue = CurrencyField::appendCurrencySymbol($formattedCurrencyValue, $cur_sym_rate['symbol']);
            }
        } else {
            $currencyField = new CurrencyField($value);
            $fieldvalue = $currencyField->getDisplayValue();
        }
    } elseif ($dbField->name == "PriceBooks_Currency") {
        if ($value != '') {
            $fieldvalue = getTranslatedCurrencyString($value);
        }
    } elseif (in_array($dbField->name, $report->ui101_fields) && !empty($value)) {
        $entityNames = getEntityName('Users', $value);
        $fieldvalue = $entityNames[$value];
    } elseif ($fieldType == 'date' && !empty($value)) {
        if ($module == 'Calendar' && $field->getFieldName() == 'due_date') {
            $endTime = $valueArray['calendar_end_time'];
            if (empty($endTime)) {
                $recordId = $valueArray['calendar_id'];
                $endTime = getSingleFieldValue('vtiger_activity', 'time_end', 'activityid', $recordId);
            }
            $date = new DateTimeField($value . ' ' . $endTime);
            $fieldvalue = $date->getDisplayDate();
        } else {
            if (!($field->getUIType() == '5')) {
                $date = new DateTimeField($fieldvalue);
                $fieldvalue = $date->getDisplayDateTimeValue();
            }
        }
    } elseif ($fieldType == "datetime" && !empty($value)) {
        $date = new DateTimeField($value);
        $fieldvalue = $date->getDisplayDateTimeValue();
    } elseif ($fieldType == 'time' && !empty($value) && $field->getFieldName() != 'duration_hours') {
        if ($field->getFieldName() == "time_start" || $field->getFieldName() == "time_end") {
            $date = new DateTimeField($value);
            $fieldvalue = $date->getDisplayTime();
        } else {
            $userModel = Users_Privileges_Model::getCurrentUserModel();
            if ($userModel->get('hour_format') == '12') {
                $value = Vtiger_Time_UIType::getTimeValueInAMorPM($value);
            }
            $fieldvalue = $value;
        }
    } elseif ($fieldType == "picklist" && !empty($value)) {
        if (is_array($picklistArray)) {
            if (is_array($picklistArray[$dbField->name]) && $field->getFieldName() != 'activitytype' && !in_array($value, $picklistArray[$dbField->name])) {
                $fieldvalue = $app_strings['LBL_NOT_ACCESSIBLE'];
            } else {
                $fieldvalue = getTranslatedString($value, $module);
            }
        } else {
            $fieldvalue = getTranslatedString($value, $module);
        }
    } elseif ($fieldType == "multipicklist" && !empty($value)) {
        if (is_array($picklistArray[1])) {
            $valueList = explode(' |##| ', $value);
            $translatedValueList = array();
            foreach ($valueList as $value) {
                if (is_array($picklistArray[1][$dbField->name]) && !in_array($value, $picklistArray[1][$dbField->name])) {
                    $translatedValueList[] = $app_strings['LBL_NOT_ACCESSIBLE'];
                } else {
                    $translatedValueList[] = getTranslatedString($value, $module);
//.........这里部分代码省略.........
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:101,代码来源:ReportUtils.php


示例7: content_5674ee6c9afb5

    function content_5674ee6c9afb5($_smarty_tpl)
    {
        ?>

<!--All final details are stored in the first element in the array with the index name as final_detailsso we will get that array, parse that array and fill the details--><?php 
        $_smarty_tpl->tpl_vars["FINAL"] = new Smarty_variable($_smarty_tpl->tpl_vars['RELATED_PRODUCTS']->value[1]['final_details'], null, 0);
        $_smarty_tpl->tpl_vars["IS_INDIVIDUAL_TAX_TYPE"] = new Smarty_variable(false, null, 0);
        $_smarty_tpl->tpl_vars["IS_GROUP_TAX_TYPE"] = new Smarty_variable(true, null, 0);
        if ($_smarty_tpl->tpl_vars['FINAL']->value['taxtype'] == 'individual') {
            $_smarty_tpl->tpl_vars["IS_GROUP_TAX_TYPE"] = new Smarty_variable(false, null, 0);
            $_smarty_tpl->tpl_vars["IS_INDIVIDUAL_TAX_TYPE"] = new Smarty_variable(true, null, 0);
        }
        ?>
<input type="hidden" class="numberOfCurrencyDecimal" value="<?php 
        echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('no_of_currency_decimals');
        ?>
" /><table class="table table-bordered blockContainer lineItemTable" id="lineItemTab"><tr><th colspan="2"><span class="inventoryLineItemHeader"><?php 
        echo vtranslate('LBL_ITEM_DETAILS', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</span></th><th colspan="2" class="chznDropDown"><div class="row-fluid"><span class="inventoryLineItemHeader"><?php 
        echo vtranslate('LBL_CURRENCY', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</span>&nbsp;&nbsp;<?php 
        $_smarty_tpl->tpl_vars['SELECTED_CURRENCY'] = new Smarty_variable($_smarty_tpl->tpl_vars['CURRENCINFO']->value, null, 0);
        if ($_smarty_tpl->tpl_vars['SELECTED_CURRENCY']->value == '') {
            $_smarty_tpl->tpl_vars['USER_CURRENCY_ID'] = new Smarty_variable($_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_id'), null, 0);
            $_smarty_tpl->tpl_vars['currency_details'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['currency_details']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['CURRENCIES']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['currency_details']->key => $_smarty_tpl->tpl_vars['currency_details']->value) {
                $_smarty_tpl->tpl_vars['currency_details']->_loop = true;
                if ($_smarty_tpl->tpl_vars['currency_details']->value['curid'] == $_smarty_tpl->tpl_vars['USER_CURRENCY_ID']->value) {
                    $_smarty_tpl->tpl_vars['SELECTED_CURRENCY'] = new Smarty_variable($_smarty_tpl->tpl_vars['currency_details']->value, null, 0);
                }
            }
        }
        ?>
<select class="chzn-select" id="currency_id" name="currency_id" style="width: 164px;"><?php 
        $_smarty_tpl->tpl_vars['currency_details'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['currency_details']->_loop = false;
        $_smarty_tpl->tpl_vars['count'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['CURRENCIES']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['currency_details']->key => $_smarty_tpl->tpl_vars['currency_details']->value) {
            $_smarty_tpl->tpl_vars['currency_details']->_loop = true;
            $_smarty_tpl->tpl_vars['count']->value = $_smarty_tpl->tpl_vars['currency_details']->key;
            ?>
<option value="<?php 
            echo $_smarty_tpl->tpl_vars['currency_details']->value['curid'];
            ?>
" class="textShadowNone" data-conversion-rate="<?php 
            echo $_smarty_tpl->tpl_vars['currency_details']->value['conversionrate'];
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['SELECTED_CURRENCY']->value['currency_id'] == $_smarty_tpl->tpl_vars['currency_details']->value['curid']) {
                ?>
 selected <?php 
            }
            ?>
><?php 
            echo getTranslatedCurrencyString($_smarty_tpl->tpl_vars['currency_details']->value['currencylabel']);
            ?>
 (<?php 
            echo $_smarty_tpl->tpl_vars['currency_details']->value['currencysymbol'];
            ?>
)</option><?php 
        }
        ?>
</select><?php 
        $_smarty_tpl->tpl_vars["RECORD_CURRENCY_RATE"] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD_STRUCTURE_MODEL']->value->getRecord()->get('conversion_rate'), null, 0);
        if ($_smarty_tpl->tpl_vars['RECORD_CURRENCY_RATE']->value == '') {
            $_smarty_tpl->tpl_vars["RECORD_CURRENCY_RATE"] = new Smarty_variable($_smarty_tpl->tpl_vars['SELECTED_CURRENCY']->value['conversionrate'], null, 0);
        }
        ?>
<input type="hidden" name="conversion_rate" id="conversion_rate" value="<?php 
        echo $_smarty_tpl->tpl_vars['RECORD_CURRENCY_RATE']->value;
        ?>
" /><input type="hidden" value="<?php 
        echo $_smarty_tpl->tpl_vars['SELECTED_CURRENCY']->value['currency_id'];
        ?>
" id="prev_selected_currency_id" /><!-- TODO : To get default currency in even better way than depending on first element --><input type="hidden" id="default_currency_id" value="<?php 
        echo $_smarty_tpl->tpl_vars['CURRENCIES']->value[0]['curid'];
        ?>
" /></div></th><th colspan="2" class="chznDropDown"><div class="row-fluid"><div class="inventoryLineItemHeader"><span class="alignTop"><?php 
        echo vtranslate('LBL_TAX_MODE', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</span></div><select class="chzn-select lineItemTax" id="taxtype" name="taxtype" style="width: 164px;"><OPTION value="individual" <?php 
        if ($_smarty_tpl->tpl_vars['IS_INDIVIDUAL_TAX_TYPE']->value) {
            ?>
selected<?php 
        }
        ?>
><?php 
        echo vtranslate('LBL_INDIVIDUAL', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
//.........这里部分代码省略.........
开发者ID:wsLapshin,项目名称:charter_crm,代码行数:101,代码来源:89f01d6d1e9323b68bfe03b8a8a7a8b03c58bc35.file.LineItemsEdit.tpl.php


示例8: getCurrencyName

/** Function to get the Currency name from the vtiger_currency_info
 * @param $currencyid -- vtiger_currencyid:: Type integer
 * @returns $currencyname -- Currency Name:: Type varchar
 *
 */
function getCurrencyName($currencyid, $show_symbol = true)
{
    global $log;
    $log->debug("Entering getCurrencyName(" . $currencyid . ") method ...");
    // Look at cache first
    $currencyinfo = VTCacheUtils::lookupCurrencyInfo($currencyid);
    if ($currencyinfo === false) {
        global $adb;
        $sql1 = "select * from vtiger_currency_info where id= ?";
        $result = $adb->pquery($sql1, array($currencyid));
        $resultinfo = $adb->fetch_array($result);
        // Update cache
        VTCacheUtils::updateCurrencyInfo($currencyid, $resultinfo['currency_name'], $resultinfo['currency_code'], $resultinfo['currency_symbol'], $resultinfo['conversion_rate']);
        // Re-look at the cache now
        $currencyinfo = VTCacheUtils::lookupCurrencyInfo($currencyid);
    }
    $currencyname = $currencyinfo['name'];
    $curr_symbol = $currencyinfo['symbol'];
    $log->debug("Exiting getCurrencyName method ...");
    if ($show_symbol) {
        return getTranslatedCurrencyString($currencyname) . ' : ' . $curr_symbol;
    } else {
        return $currencyname;
    }
    // NOTE: Without symbol the value could be used for filtering/lookup hence avoiding the translation
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:CommonUtils.php


示例9: content_5674f3567fadf

    function content_5674f3567fadf($_smarty_tpl)
    {
        ?>
<div id="currency_class" class="multiCurrencyEditUI modelContainer"><div class="modal-header"><button data-dismiss="modal" class="floatRight close" type="button" title="<?php 
        echo vtranslate('LBL_CLOSE');
        ?>
">x</button><h3 id="massEditHeader"><?php 
        echo vtranslate('LBL_PRICES', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</h3></div><div class="multiCurrencyContainer"><div class="currencyContent"><div class="modal-body"><table width="100%" border="0" cellpadding="5" cellspacing="0" class="table table-bordered"><tr class="detailedViewHeader"><td><b><?php 
        echo vtranslate('LBL_CURRENCY', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</b></td><td><b><?php 
        echo vtranslate('LBL_PRICE', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</b></td><td><b><?php 
        echo vtranslate('LBL_CONVERSION_RATE', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</b></td><td><b><?php 
        echo vtranslate('LBL_RESET_PRICE', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</b></td><td><b><?php 
        echo vtranslate('LBL_BASE_CURRENCY', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</b></td></tr><?php 
        $_smarty_tpl->tpl_vars['price'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['price']->_loop = false;
        $_smarty_tpl->tpl_vars['count'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['PRICE_DETAILS']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['price']->key => $_smarty_tpl->tpl_vars['price']->value) {
            $_smarty_tpl->tpl_vars['price']->_loop = true;
            $_smarty_tpl->tpl_vars['count']->value = $_smarty_tpl->tpl_vars['price']->key;
            ?>
<tr data-currency-id=<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curname'];
            ?>
><?php 
            if ($_smarty_tpl->tpl_vars['price']->value['check_value'] == 1 || $_smarty_tpl->tpl_vars['price']->value['is_basecurrency'] == 1) {
                $_smarty_tpl->tpl_vars['check_value'] = new Smarty_variable("checked", null, 0);
                $_smarty_tpl->tpl_vars['disable_value'] = new Smarty_variable('', null, 0);
            } else {
                $_smarty_tpl->tpl_vars['check_value'] = new Smarty_variable('', null, 0);
                $_smarty_tpl->tpl_vars['disable_value'] = new Smarty_variable("disabled=true", null, 0);
            }
            if ($_smarty_tpl->tpl_vars['price']->value['is_basecurrency'] == 1) {
                $_smarty_tpl->tpl_vars['base_cur_check'] = new Smarty_variable("checked", null, 0);
            } else {
                $_smarty_tpl->tpl_vars['base_cur_check'] = new Smarty_variable('', null, 0);
            }
            ?>
<td><span class="row-fluid"><span class="span8 alignBottom"><span class="pull-left"><?php 
            echo getTranslatedCurrencyString($_smarty_tpl->tpl_vars['price']->value['currencylabel']);
            ?>
 (<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['currencysymbol'];
            ?>
)</span></span><span class="span2"><input type="checkbox" name="cur_<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curid'];
            ?>
_check" id="cur_<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curid'];
            ?>
_check" class="small pull-right enableCurrency" <?php 
            echo $_smarty_tpl->tpl_vars['check_value']->value;
            ?>
></span></span></td><td><div class="row-fluid"><input <?php 
            echo $_smarty_tpl->tpl_vars['disable_value']->value;
            ?>
 type="text" size="10" class="span9 convertedPrice" name="<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curname'];
            ?>
" id="<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curname'];
            ?>
" value="<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curvalue'];
            ?>
" data-validation-engine="validate[funcCall[Vtiger_Currency_Validator_Js.invokeValidation]]" data-decimal-seperator='<?php 
            echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_decimal_separator');
            ?>
' data-group-seperator='<?php 
            echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_grouping_separator');
            ?>
' /></div></td><td><div class="row-fluid"><input readonly="" type="text" size="10" class="span9 conversionRate" name="cur_conv_rate<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curid'];
            ?>
" value="<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['conversionrate'];
            ?>
"></div></td><td><div class="row-fluid"><button <?php 
            echo $_smarty_tpl->tpl_vars['disable_value']->value;
            ?>
 type="button" class="btn currencyReset resetButton" id="cur_reset<?php 
            echo $_smarty_tpl->tpl_vars['price']->value['curid'];
            ?>
" value="<?php 
            echo vtranslate('LBL_RESET', $_smarty_tpl->tpl_vars['MODULE']->value);
//.........这里部分代码省略.........
开发者ID:wsLapshin,项目名称:charter_crm,代码行数:101,代码来源:35b95449d311c8aebf33d6b2a1b31218d1f2d35e.file.MoreCurrenciesList.tpl.php


示例10: if

		<input type="hidden" value="<?php echo $this->_tpl_vars['INV_CURRENCY_ID']; ?>
" id="prev_selected_currency_id" />
		<b><?php echo $this->_tpl_vars['APP']['LBL_CURRENCY']; ?>
</b>&nbsp;&nbsp;
		<select class="small" id="inventory_currency" name="inventory_currency" onchange="updatePrices();">
		<?php $_from = $this->_tpl_vars['CURRENCIES_LIST']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['count'] => $this->_tpl_vars['currency_details']):
?>
			<?php if ($this->_tpl_vars['currency_details']['curid'] == $this->_tpl_vars['INV_CURRENCY_ID']): ?>
				<?php $this->assign('currency_selected', 'selected'); ?>
			<?php else: ?>
				<?php $this->assign('currency_selected', ""); ?>
			<?php endif; ?>
			<OPTION value="<?php echo $this->_tpl_vars['currency_details']['curid']; ?>
" <?php echo $this->_tpl_vars['currency_selected']; ?>
><?php echo getTranslatedCurrencyString($this->_tpl_vars['currency_details']['currencylabel']); ?>
 (<?php echo $this->_tpl_vars['currency_details']['currencysymbol']; ?>
)</OPTION>
		<?php endforeach; endif; unset($_from); ?>
		</select>
	</td>
	
	<td class="dvInnerHeader" align="center" colspan="2">
		<b><?php echo $this->_tpl_vars['APP']['LBL_TAX_MODE']; ?>
</b>&nbsp;&nbsp;
		
		<?php if ($this->_tpl_vars['ASSOCIATEDPRODUCTS']['1']['final_details']['taxtype'] == 'group'): ?>
			<?php $this->assign('group_selected', 'selected'); ?>
		<?php else: ?>
			<?php $this->assign('individual_selected', 'selected'); ?>
		<?php endif; ?>
开发者ID:nvh3010,项目名称:quancrm,代码行数:31,代码来源:%%CE^CE3^CE358087%%ProductDetailsEditView.tpl.php


示例11: settype

					<?php 
            $_from = $this->_tpl_vars['arr'];
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            if (count($_from)) {
                foreach ($_from as $this->_tpl_vars['sel_value'] => $this->_tpl_vars['value']) {
                    ?>
						<option value="<?php 
                    echo $this->_tpl_vars['uivalueid'];
                    ?>
" <?php 
                    echo $this->_tpl_vars['value'];
                    ?>
><?php 
                    echo getTranslatedCurrencyString($this->_tpl_vars['sel_value']);
                    ?>
</option>
						<!-- code added to pass Currency field value, if Disabled for nonadmin -->
						<?php 
                    if ($this->_tpl_vars['value'] == 'selected' && $this->_tpl_vars['secondvalue'] != 1) {
                        ?>
							<?php 
                        $this->assign('curr_stat', $this->_tpl_vars['uivalueid']);
                        ?>
						<?php 
                    }
                    ?>
						<!--code ends -->
					<?php 
                }
开发者ID:latechdirect,项目名称:vtiger,代码行数:31,代码来源:%%A5^A56^A56B4989%%EditViewUI.tpl.php


示例12: vtigerCRM_Smarty

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getTranslatedString函数代码示例发布时间:2022-05-15
下一篇:
PHP getTransferHash函数代码示例发布时间: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