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


PHP getTranslatedCurrencyString函数代码示例

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


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

$smarty = new vtigerCRM_Smarty();
$parenttab = getParentTab();
$sql = "select * from vtiger_currency_info where deleted=0";
$result = $adb->pquery($sql, array());
$temprow = $adb->fetch_array($result);
$cnt = 1;
$currency = array();
do {
    $currency_element = array();
    $currency_element['name'] = $temprow["currency_name"];
    $currency_element['code'] = $temprow["currency_code"];
    $currency_element['symbol'] = $temprow["currency_symbol"];
    $currency_element['crate'] = $temprow["conversion_rate"];
    $currency_element['status'] = $temprow["currency_status"];
    if ($temprow["defaultid"] != '-11') {
        $currency_element['name'] = '<a href=index.php?module=Settings&action=CurrencyEditView&parenttab=' . $parenttab . '&record=' . $temprow["id"] . '&detailview=detail_view>' . getTranslatedCurrencyString($temprow["currency_name"]) . '</a>';
        $currency_element['tool'] = '<a href=index.php?module=Settings&action=CurrencyEditView&parenttab=' . $parenttab . '&record=' . $temprow["id"] . '><img src="' . vtiger_imageurl('editfield.gif', $theme) . '" border="0" alt="' . $app_strings['LBL_EDIT_BUTTON_LABEL'] . '" title="' . $app_strings['LBL_EDIT_BUTTON_LABEL'] . '"/></a>&nbsp;|&nbsp;<img style="cursor:pointer;" onClick="fnvshobj(this,\'currencydiv\');deleteCurrency(\'' . $temprow['id'] . '\');" src="' . vtiger_imageurl('delete.gif', $theme) . '" border="0"  alt="' . $app_strings['LBL_DELETE_BUTTON_LABEL'] . '" title="' . $app_strings['LBL_DELETE_BUTTON_LABEL'] . '"/>';
    } else {
        $currency_element['tool'] = '';
    }
    $currency[] = $currency_element;
    $cnt++;
} while ($temprow = $adb->fetch_array($result));
$smarty->assign("PARENTTAB", $parenttab);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MOD", $mod_strings);
$smarty->assign("CURRENCY_LIST", $currency);
if ($_REQUEST['ajax'] != '') {
    $smarty->display("CurrencyListViewEntries.tpl");
} else {
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:CurrencyListView.php

示例13: array

$this->_foreach['currlist'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['currlist']['total'] > 0) {
    foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['currencyvalues']) {
        $this->_foreach['currlist']['iteration']++;
        ?>
		<tr>
			<td nowrap class="listTableRow small" valign="top"><?php 
        echo $this->_foreach['currlist']['iteration'];
        ?>
</td>
			<td nowrap class="listTableRow small" valign="top"><?php 
        echo $this->_tpl_vars['currencyvalues']['tool'];
        ?>
</td>
			<td nowrap class="listTableRow small" valign="top"><b><?php 
        echo getTranslatedCurrencyString($this->_tpl_vars['currencyvalues']['name']);
        ?>
</b></td>
			<td nowrap class="listTableRow small" valign="top"><?php 
        echo $this->_tpl_vars['currencyvalues']['code'];
        ?>
</td>
			<td nowrap class="listTableRow small" valign="top"><?php 
        echo $this->_tpl_vars['currencyvalues']['symbol'];
        ?>
</td>
			<td nowrap class="listTableRow small" valign="top"><?php 
        echo $this->_tpl_vars['currencyvalues']['crate'];
        ?>
</td>
			<?php 
开发者ID:latechdirect,项目名称:vtiger,代码行数:31,代码来源:%%48^484^484D07DA%%CurrencyListViewEntries.tpl.php

示例14: x0d

 private function x0d()
 {
     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;
     if ($this->module == "Quotes" || $this->module == "Invoice" || $this->module == "SalesOrder" || $this->module == "PurchaseOrder") {
         $this->replacements["\$" . "SUBTOTAL\$"] = $this->x1e($this->focus->column_fields["hdnSubTotal"]);
         $this->replacements["\$" . "TOTAL\$"] = $this->x1e($this->focus->column_fields["hdnGrandTotal"]);
         $currencytype = $this->x1c();
         $currencytype["currency_symbol"] = $x1e("€", "&euro;", $currencytype["currency_symbol"]);
         $currencytype["currency_symbol"] = $x1e("£", "&pound;", $currencytype["currency_symbol"]);
         $this->replacements["\$" . "CURRENCYNAME\$"] = getTranslatedCurrencyString($currencytype["currency_name"]);
         $this->replacements["\$" . "CURRENCYSYMBOL\$"] = $currencytype["currency_symbol"];
         $this->replacements["\$" . "CURRENCYCODE\$"] = $currencytype["currency_code"];
         $this->replacements["\$" . "ADJUSTMENT\$"] = $this->x1e($this->focus->column_fields["txtAdjustment"]);
         $Products = $this->x15();
         $this->replacements["\$" . "TOTALWITHOUTVAT\$"] = $Products["TOTAL"]["TOTALWITHOUTVAT"];
         $this->replacements["\$" . "VAT\$"] = $Products["TOTAL"]["TAXTOTAL"];
         $this->replacements["\$" . "VATPERCENT\$"] = $Products["TOTAL"]["TAXTOTALPERCENT"];
         if ($x0f($Products["TOTAL"]["VATBLOCK"]) > 0) {
             $vattable = "<table border='1' style=\"border-collapse:collapse;\" cellpadding=\"3\">";
             $vattable .= "<tr>\r\n\t                        <td nowrap align='center'>" . $this->app_strings["Name"] . "</td>\r\r\n\t\t\t\t\t\t\t<td nowrap align='center'>" . $this->mod_strings["LBL_VATBLOCK_VAT_PERCENT"] . "</td>\r\r\n\t                        <td nowrap align='center'>" . $this->mod_strings["LBL_VATBLOCK_SUM"] . " (" . $currencytype["currency_symbol"] . ")" . "</td>\r\n\t                        <td nowrap align='center'>" . $this->mod_strings["LBL_VATBLOCK_VAT_VALUE"] . " (" . $currencytype["currency_symbol"] . ")" . "</td>\r\n\t                      </tr>";
             foreach ($Products["TOTAL"]["VATBLOCK"] as $keyW => $valueW) {
                 if ($valueW["netto"] != 0) {
                     $vattable .= "<tr>\r\n                                    <td nowrap align='left' width='20%'>" . $valueW["label"] . "</td>\r\n\n                    \t\t\t\t<td nowrap align='right' width='25%'>" . $this->x1e($valueW["value"]) . " %</td>\r\r\n                                    <td nowrap align='right' width='30%'>" . $this->x1e($valueW["netto"]) . "</td>\r\n\n                                    <td nowrap align='right' width='25%'>" . $this->x1e($valueW["vat"]) . "</td>\r\n                                  </tr>";
                 }
             }
             $vattable .= "</table>";
         } else {
             $vattable = "";
         }
         $this->replacements["\$" . "VATBLOCK\$"] = $vattable;
         $this->replacements["\$" . "TOTALWITHVAT\$"] = $Products["TOTAL"]["TOTALWITHVAT"];
         $this->replacements["\$" . "SHTAXAMOUNT\$"] = $Products["TOTAL"]["SHTAXAMOUNT"];
         $this->replacements["\$" . "SHTAXTOTAL\$"] = $Products["TOTAL"]["SHTAXTOTAL"];
         $this->replacements["\$" . "TOTALDISCOUNT\$"] = $Products["TOTAL"]["FINALDISCOUNT"];
         $this->replacements["\$" . "TOTALDISCOUNTPERCENT\$"] = $Products["TOTAL"]["FINALDISCOUNTPERCENT"];
         $this->replacements["\$" . "TOTALAFTERDISCOUNT\$"] = $Products["TOTAL"]["TOTALAFTERDISCOUNT"];
         $this->x12();
         $var_array = array();
         if ($x23($this->content, "#PRODUCTBLOC_START#") !== false && $x23($this->content, "#PRODUCTBLOC_END#") !== false) {
             $tableTag = $this->x0c();
             $breaklines_array = $this->x16();
             $breaklines = $breaklines_array["products"];
             $show_header = $breaklines_array["show_header"];
             $show_subtotal = $breaklines_array["show_subtotal"];
             $breakline_type = "";
             if ($x0f($breaklines) > 0) {
                 if ($tableTag !== false) {
                     $breakline_type = "</table>" . $this->pagebreak . $tableTag["tag"];
                     if ($show_header == 1) {
                         $breakline_type .= $tableTag["header"];
                     }
                     if ($show_subtotal == 1) {
                         $breakline_type = $tableTag["subtotal"] . $breakline_type;
                     } else {
                         $breakline_type = $tableTag["footer"] . $breakline_type;
                     }
                 } else {
                     $breakline_type = $this->pagebreak;
                 }
             }
             $ExplodedPdf = array();
             $Exploded = $x11("#PRODUCTBLOC_START#", $this->content);
             $ExplodedPdf[] = $Exploded[0];
             for ($iterator = 1; $iterator < $x0f($Exploded); $iterator++) {
                 $SubExploded = $x11("#PRODUCTBLOC_END#", $Exploded[$iterator]);
                 foreach ($SubExploded as $part) {
                     $ExplodedPdf[] = $part;
                 }
                 $highestpartid = $iterator * 2 - 1;
                 $ProductParts[$highestpartid] = $ExplodedPdf[$highestpartid];
                 $ExplodedPdf[$highestpartid] = '';
             }
             if ($Products["P"]) {
                 foreach ($Products["P"] as $Product_i => $Product_Details) {
                     foreach ($ProductParts as $productpartid => $productparttext) {
                         $breakline = "";
                         if ($breakline_type != "" && isset($breaklines[$Product_Details["SERVICES_RECORD_ID"] . "_" . $Product_Details["PRODUCTSEQUENCE"]]) || isset($breaklines[$Product_Details["PRODUCTS_RECORD_ID"] . "_" . $Product_Details["PRODUCTSEQUENCE"]])) {
                             $breakline = $breakline_type;
                         }
                         $productparttext .= $breakline;
                         foreach ($Product_Details as $coll => $value) {
                             $productparttext = $x1e("\$" . $x22($coll) . "\$", $value, $productparttext);
                         }
                         $ExplodedPdf[$productpartid] .= $productparttext;
                     }
                 }
             }
             $this->content = $x15('', $ExplodedPdf);
         }
     }
 }
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:91,代码来源:InventoryPDF.php

示例15: 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, $default_charset;
    global $mod_strings;
    global $theme;
    global $log;
    global $app_strings, $current_user, $current_language;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    //crm-now: added to select comma or dot as numberformat
    //European Format
    if ($current_language == 'en_us') {
        //US Format
        $decimal_precision = 2;
        $decimals_separator = '.';
        $thousands_separator = ',';
    } else {
        //European Format
        $decimal_precision = 2;
        $decimals_separator = ',';
        $thousands_separator = '.';
    }
    if ($module != 'PurchaseOrder') {
        $colspan = '2';
    } else {
        $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') {
        $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.productcode else 'NA' end as productcode," . " 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');
        //crm-now added to display product code and description
        $productcode = $adb->query_result($result, $i - 1, 'productcode');
        //html to utf8 conversion (necessary because stored at inventoryproductrel table)
        $productdescription = nl2br($adb->query_result($result, $i - 1, 'description'));
        $productdescription = html_entity_decode($productdescription, ENT_QUOTES, $default_charset);
        $comment = nl2br(from_html($adb->query_result($result, $i - 1, 'comment')));
        if ($subprodname_str != '') {
            $productname .= "<br/><span style='color:#C0C0C0;font-style:italic;'>" . $subprodname_str . "</span>";
        }
//.........这里部分代码省略.........
开发者ID:joomlacorner,项目名称:vtigerthai,代码行数:101,代码来源:DetailViewUtils.php


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