예제 #1
0
        foreach ($product_focus->column_fields as $key => $value) {
            $product_line[$j][$key] = $value;
        }
        $product_line[$j]["name"] = $product_name[$i];
        $product_line[$j]["spec"] = $serial_no[$i];
        $product_line[$j]["code"] = $productcode[$i];
        $product_line[$j]["imagename"] = $imagename[$i];
        $product_line[$j]["unit"] = $usageunit[$i];
        $product_line[$j]["qty"] = $qty[$i] . $usageunit[$i];
        $product_line[$j]["num"] = $qty[$i];
        $product_line[$j]["price"] = $list_price[$i];
        $product_line[$j]["total"] = $prod_total[$i];
        $product_line[$j]["description"] = $prod_description[$i];
        $product_focus = null;
    }
    $price_total = ec_number_format($focus->column_fields["total"]);
    $TOTAL = $price_total;
    //金额
    $TOTAL_BIG = toCNcap($price_total);
    //大写金额
    $TOTAL_BIG = iconv_ec("GBK", "UTF-8", $TOTAL_BIG);
}
$MODULE_LABEL = $app_strings["Memdays"];
$TBS = new clsTinyButStrong();
$TBS->NoErr = true;
// no more error message displayed.
// Load the template
if (isset($module_enable_product) && $module_enable_product) {
    $TBS->LoadTemplate('modules/Memdays/' . $templatefile . '.html', 'UTF-8');
    $TBS->MergeBlock('product', $product_line);
} else {
예제 #2
0
function convertPriceIntoRen($price, $rate)
{
    if (!empty($rate) && $rate != 0) {
        $price = $price * $rate;
    }
    $price = ec_number_format($price, true);
    return $price;
}
예제 #3
0
/** This function returns the amount converted from dollar.
 * param $amount - amount to be converted.
 * param $crate - conversion rate.
 */
function convertFromDollar($amount, $crate)
{
    /*
    global $log;
    if($crate == 0) {
    	return $amount;
    }
    $log->debug("Entering convertFromDollar(".$amount.",".$crate.") method ...");
    $log->debug("Exiting convertFromDollar method ...");
    $amount = $amount * $crate;
    */
    $amount = ec_number_format($amount);
    return $amount;
}