Example #1
0
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.ijoomla.com
# Technical Support:  Forum - http://www.ijoomla.com.com/forum/index/
-------------------------------------------------------------------------*/
defined('_JEXEC') or die('Restricted access');
$doc = JFactory::getDocument();
$doc->addScript(JURI::root() . '/components/com_guru/js/sorttable.js');
$guruModelguruAuthor = new guruModelguruAuthor();
$details = $this->details;
$n = count($details);
$config = $this->config;
$datetype = $config->datetype;
$currencypos = $config->currencypos;
$character = "GURU_CURRENCY_" . $config->currency;
$total_pending = $this->total_pending;
$sum_price = $guruModelguruAuthor->getPendingDetailsTotalPrice();
$sum_price_paid = $guruModelguruAuthor->getPendingDetailsTotalPricePaid();
//-----------------------------------------------------------------------------------
$tot = "";
if (isset($total_pending) && count($total_pending) > 0) {
    $temp = array();
    foreach ($total_pending as $key => $value) {
        if (isset($temp[$value["currency"]])) {
            $temp[$value["currency"]] += $value["amount_paid_author"];
        } else {
            $temp[$value["currency"]] = $value["amount_paid_author"];
        }
    }
    if ($currencypos == 0) {
        foreach ($temp as $currency => $value) {
            $temp[$currency] = JText::_("GURU_CURRENCY_" . $currency) . " " . number_format($value, 2);