echo get_currency_delimiter_from_lab_config_settings(); ?> 00 <?php echo get_currency_type_from_lab_config_settings(); ?> <br/><br/> <?php if ($defaultCurrency == "") { ?> <div id="exchange_rate" style='display:none;' ></div><?php } else { ?> <?php $alreadyExistingExchangeRates = array(); if ($defaultCurrency != "") { $exchangeRates = currencyConfig::getExchangeRateSnap($lab_config_id, $defaultCurrency->getCurrencyFrom()); $totalCurrencies = count($allCurrencies); $totalExchangeRates = count($exchangeRates); } ?> <?php if ($totalExchangeRates < 1) { ?> <div id="exchange_rate" style='display:none;'></div> <?php } else { ?> <div id="exchange_rate" > <table border="1"> <tr> <th> <?php
} else { $secondaryCurrencies = currencyConfig::getAllSecondaryCurrencies($lab_config_id, $defaultCurrency->getCurrencyTo()); } // Currency Type if (isset($_REQUEST['CT'])) { $currencyTo = $_REQUEST['CT']; } else { if (!is_null($defaultCurrency)) { $currencyTo = $defaultCurrency->getCurrencyTo(); } else { $currencyTo = $defCurrencyIfnotSet; } } $defaultFlag = 0; if (!is_null($defaultCurrency)) { $exchange_rate = currencyConfig::getExchangeRateValue($lab_config_id, $defaultCurrency->getCurrencyTo(), $currencyTo); } else { $exchange_rate = 1; $defaultFlag = 1; } if (isset($_REQUEST['yf'])) { $date_from = $_REQUEST['yf'] . "-" . $_REQUEST['mf'] . "-" . $_REQUEST['df']; $date_to = $_REQUEST['yt'] . "-" . $_REQUEST['mt'] . "-" . $_REQUEST['dt']; } else { $date_from = date("Y-m-d"); $date_to = $date_from; } $uiinfo = "from=" . $date_from . "&to=" . $date_to . "&ip=" . $_REQUEST['ip'] . "&viz=" . $_REQUEST['viz']; putUILog('reports_testhistory', $uiinfo, basename($_SERVER['REQUEST_URI'], ".php"), 'X', 'X', 'X'); // function to draw vis function draw_visualization($cleaned_result, $cleaned_range)
public static function getAllSecondaryCurrencies($lab_config_id, $default_currency) { $saved_db = DbUtil::switchToLabConfig($lab_config_id); $query_string = "SELECT distinct currencyb FROM currency_conversion where currencya='{$default_currency}'"; $resultset = query_associative_all($query_string, $row_count); $record_c = array(); foreach ($resultset as $record) { foreach ($record as $key => $value) { $query_string = "SELECT * FROM currency_conversion WHERE currencya='{$value}' && currencya=currencyb"; $record_each = query_associative_one($query_string); $record_c[] = currencyConfig::getObject($record_each); } } DbUtil::switchRestore($saved_db); return $record_c; }