本文整理汇总了PHP中displayCurrency函数的典型用法代码示例。如果您正苦于以下问题:PHP displayCurrency函数的具体用法?PHP displayCurrency怎么用?PHP displayCurrency使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了displayCurrency函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSummary
function getSummary($summary_data)
{
$result = array();
$total_unpaid = 0;
$total_unpaid = 0;
$have_orders = false;
if (count($summary_data) > 0) {
$have_orders = true;
$total_unpaid = 0;
$total_unpaid_vorkasse = 0;
foreach ($summary_data as $dt) {
$payment_method = $dt['payment_method'];
$saldo = $dt['amount_saldo'];
$payment_method = strtoupper(trim($payment_method));
$total_unpaid += $saldo;
if ($payment_method == strtoupper(PAYMENT_METHOD_BANK_TRANSFER) || $payment_method == strtoupper(PAYMENT_METHOD_PREPAYMENT)) {
$total_unpaid_vorkasse += $saldo;
}
}
}
$result['total_unpaid'] = displayCurrency(CURRENCY_CODE_EURO, $total_unpaid);
$result['total_unpaid_vorkasse'] = displayCurrency(CURRENCY_CODE_EURO, $total_unpaid_vorkasse);
$result['have_orders'] = $have_orders;
return $result;
}
示例2: manageLogisticList
function manageLogisticList($rowperpage, $page)
{
$result = '';
$result .= '<div>';
$result .= '<input type="button" id="newlogpack" value="Create New" title="Create New Logistic Package" />';
$result .= '<a href="?open=packages-logistic-detail&hidemenu=true" class="view_webpage"></a>';
$result .= '</div>';
$result .= '<div> </div>';
$count_logistic_query = tep_db_query("SELECT COUNT(logistic_id) AS total FROM minierp_logistic");
$count_logistic = tep_db_fetch_array($count_logistic_query);
$offset = ($page - 1) * $rowperpage;
$paging_filter = "LIMIT {$rowperpage} OFFSET {$offset}";
$lq = "SELECT ml.*, SUM(products_total_count) AS total_qty";
$lq .= " FROM minierp_logistic ml";
$lq .= " LEFT JOIN minierp_logistic_contents mlc ON mlc.logistic_id=ml.logistic_id";
$lq .= " GROUP BY logistic_id";
$lq .= " ORDER BY logistic_date DESC";
$lq .= " {$paging_filter}";
$logistic_query = tep_db_query($lq);
$logistic = array();
while ($row = tep_db_fetch_array($logistic_query)) {
$logistic[] = $row;
}
if (count($logistic) > 0) {
$pagelink = tep_paging($count_logistic['total'], $page, '?open=packages-logistic-list&page=');
$log_table = array();
$lt = array();
$lt['pac_code'] = 'Shipper Code';
$lt['long_id'] = 'Invoice No';
$lt['date'] = 'Sent Date';
$lt['qty'] = 'Qty';
$lt['countpro'] = 'Weight';
$lt['price'] = 'Price';
$lt['awb_no'] = 'AWB No';
$log_table[] = $lt;
foreach ($logistic as $l) {
$log_date = strtotime($l['logistic_date']);
$sent_date = $l['sent_date'] == '' ? ' ' : date('d-M-Y', strtotime($l['sent_date']));
$lt = array();
$lt['pac_code'] = '<a href="?open=packages-logistic-detail&id=' . $l['logistic_id'] . '&hidemenu=true" class="view_webpage" title="View Logistic Detail">' . $l['logistic_code'] . '</a>';
$lt['long_id'] = $l['ptb_no'] != '' ? date('ym', $log_date) . '-' . $l['ptb_no'] : ' ';
$lt['date'] = date('j-M-y', $log_date);
$lt['qty'] = $l['total_qty'];
$lt['countpro'] = $l['logistic_weight'] . ' Kg';
$lt['price'] = displayCurrency($l['currency'], $l['logistic_price']);
$lt['awb_no'] = $this->awbCodeLink($l['awb_no']);
$log_table[] = $lt;
}
$result .= tep_draw_table('packages', $log_table);
$result .= $pagelink;
} else {
$result .= '<h3 class="red">No Logistic Packages is found in database</h3>';
}
return $result;
}
示例3: drawPLthumb
function drawPLthumb($row, $hide = false)
{
global $jng_sp_id;
$link = '?' . (is_null($jng_sp_id) ? 'open=product-detail&products_id=' : 'open=sp-product&id=') . $row['products_id'];
$l = '<div id="pid-' . $row['products_id'] . '" class="pro-thumb">';
$l .= '<input type="hidden" name="products_id" value="' . $row['products_id'] . '" />';
$l .= '<div><a href="' . $link . '" target="_blank" title="Manage product detail ID: ' . $row['products_id'] . '">' . webImage($row['products_image'], '120', '120') . '</a></div>';
$l .= '<div>' . displayCurrency('EUR', $row['products_price']) . '</div>';
$l .= '<div class="blue" title="Click to add this product">(+) Add</div>';
$l .= '</div>';
return $l;
}
示例4: getTotalOrderAmount
function getTotalOrderAmount($type, $order_id, $currency = 'EUR')
{
$type = strtoupper($type);
if ($type == 'J') {
global $class_o;
$orders_total = $class_o->retrieveTotals($order_id);
$total_price = $orders_total['ot_total']['value'];
} elseif ($type == 'S') {
$q_total_price = "SELECT jo.shipping_costs+jo.cod_costs+SUM(joi.order_quantity * joi.price) total_price FROM jng_sp_orders jo";
$q_total_price .= " INNER JOIN jng_sp_orders_items joi ON joi.jng_sp_orders_id = jo.jng_sp_orders_id";
$q_total_price .= " WHERE jo.jng_sp_orders_id = {$order_id}";
$q_total_price .= " AND joi.status NOT IN (10, 12)";
$dbq = tep_db_query($q_total_price);
$rtp = tep_db_fetch_array($dbq);
$total_price = $rtp['total_price'];
}
return displayCurrency($currency, $total_price);
}
示例5: constructProductDetailInfo
function constructProductDetailInfo($pid, $p_data = array(), $is_reference_products = false, $use_link = false)
{
global $class_pm;
if (count($p_data) == 0) {
$p_data = $class_pm->retrieveDetail($pid, 'p,pd');
}
$pinfo = array();
if ($is_reference_products) {
$ref_status = ' <small class="notice">(Reference Product)</small>';
}
$pid_and_code = $use_link ? "<a class=\"view_webpage\" href=\"?open=product-detail&hidemenu=true&products_id={$pid}#prodet-tab2\" target=\"_blank\">{$pid} / " . $p_data['p']['products_model'] . "</a>" : "{$pid} / " . $p_data['p']['products_model'];
$pinfo[] = "<small class=\"notice\">Products Info:</small><br/>{$pid_and_code}{$ref_status}";
$pinfo[] = '<br/><small class="notice">Products Name:</small><br/>' . $p_data['pd'][2]['products_name'];
$pinfo[] = '<br/><small class="notice">Products Description:</small><br/>' . $p_data['pd'][2]['products_description'];
$pinfo[] = '<br/><small class="notice">Products Brand:</small> ' . $p_data['p']['products_brand_name'];
$pinfo[] = '<br/><small class="notice">Products Price:</small> ' . displayCurrency('EUR', $p_data['p']['products_price']);
return $pinfo;
}
示例6: drawThumbs
function drawThumbs($links, $type, $addlink)
{
global $maxlinks;
$results = '';
if (is_array($links[$type]) && count($links[$type]) > 0) {
foreach ($links[$type] as $l) {
$results .= '<div id="pl-' . $l['products_linking_id'] . '" class="pro-thumb">';
$results .= '<div>' . webImage($l['products_image'], '80', '80') . '</div>';
$results .= '<div>' . displayCurrency('EUR', $l['products_price']) . '</div>';
$results .= '<div class="red">(x) remove</div>';
$results .= '</div>';
}
} else {
$results .= '';
}
$visible = count($links[$type]) < $maxlinks[$type] ? '' : 'style="display:none;"';
$addlink = sprintf($addlink, $visible, $type);
$results .= $addlink;
return $results;
}
示例7: displayCurrency
$pdf->setFont('Arial', 'B', '10');
//$pdf->Cell($cellsize, $cell_height, $no++ . ". " . (($header) ? $p['categories_name'] : ''));
//wrap categories name to fit with box
$pdf->MultiCell(40, 3, $no++ . ". " . ($header ? $p['categories_name'] : ''), 0, 'L');
$header = false;
$pdf->setFont('Arial', '', '10');
$pdf->drawStar($p['stars'], $cellstart + 15, $ypos + 29);
$pdf->setXY($firstbox_xpos, $ypos + 35);
$link = 'http://' . $server . '/?open=product-detail&products_id=' . $p['products_id'];
$pdf->SetFont('Arial', 'U');
$pdf->SetTextColor(0, 0, 255);
$pdf->Cell($firstbox_text_size, $cell_height, $pid . ' / ' . $p['products_model'], 0, 0, 'C', 0, $link);
$pdf->SetFont('Arial', '');
$pdf->SetTextColor(0, 0, 0);
$pdf->setXY($firstbox_xpos, $ypos + 40);
$pdf->Cell($firstbox_text_size, $cell_height, 'Price: ' . displayCurrency('EUR', $p['products_price'], false), 0, 0, 'C');
//$pdf->Cell($cellsize, $cell_height, 'Price/Margin: '.displayCurrency('EUR', $p['products_price'], false).' / '.$p['fmargin']);
$pdf->setXY($firstbox_xpos, $ypos + 45);
$pdf->Cell($firstbox_text_size, $cell_height, 'Margin: ' . $p['fmargin'], 0, 0, 'C');
//$pdf->Cell($cellsize, $cell_height, 'Total Sold L30D: '.$p['last_30_days']);
//$pdf->Cell($cellsize, $cell_height, 'Total Sold L4W: '.$p['total_sold_L4W']);
$pdf->setXY($firstbox_xpos, $ypos + 50);
$pdf->setFont('Arial', 'B');
//$pdf->Cell($cellsize, $cell_height, 'Total Sold L30D: '.$p['last_30_days']);
//$pdf->Cell($cellsize, $cell_height, 'Total Sold L4W: '.$p['total_sold_L4W']);
$pdf->Cell($firstbox_text_size, $cell_height, 'Sold L4W/L30D: ' . $p['total_sold_L4W'] . ' / ' . $p['last_30_days'], 0, 0, 'C');
$pdf->SetFont('Arial', '');
foreach ($p['weekly'] as $p_weekly) {
$pdf->setXY($cellsizecollweek, $ypos);
$pdf->Cell($cellsize, $cell_height_col, '', 1, 0);
$pdf->setXY($cellsizecollweek + 2, $ypos + 3);
示例8: formatTableRow
function formatTableRow($row_id, $sold = 'Sold<br />(pieces)', $net_sales = 'Net Sales<br />({CURRENCY})', $net_sales_ratio = 'Net Sales<br />Ratio (%)', $price_average = 'Average Price<br />({CURRENCY})', $margin_average = 'Average<br />Margin (%)', $profit = 'Profit<br />({CURRENCY})', $profit_ratio = 'Profit<br />Ratio (%)', $return_rate = 'Return<br />Rate (%)', $is_header = true)
{
global $number_format;
if (!$is_header) {
//Check requested number format
if ($number_format == 'EN' || $number_format == 'DE') {
//If using flat (english/deutsch), for direct copy paste to excel
$decimal_separator = $number_format == 'EN' ? '.' : ',';
//Currency
$net_sales = number_format($net_sales, 2, $decimal_separator, '');
$price_average = number_format($price_average, 2, $decimal_separator, '');
$profit = number_format($profit, 2, $decimal_separator, '');
//% Percentage Fromat
$net_sales_ratio = displayPercentage($net_sales_ratio, 1, $decimal_separator, false);
$margin_average = displayPercentage($margin_average, 1, $decimal_separator, false);
$profit_ratio = displayPercentage($profit_ratio, 1, $decimal_separator, false);
$return_rate = displayPercentage($return_rate, 1, $decimal_separator, false);
//Pieces
$sold = strval(round($sold, 0));
} else {
//If using manobo default for nicer view
//Currency Format
$net_sales = displayCurrency(CURRENCY_DEFAULT, $net_sales, false);
$price_average = displayCurrency(CURRENCY_DEFAULT, $price_average, false);
$profit = displayCurrency(CURRENCY_DEFAULT, $profit, false);
//% Percentage Fromat
$net_sales_ratio = displayPercentage($net_sales_ratio);
$margin_average = displayPercentage($margin_average);
$profit_ratio = displayPercentage($profit_ratio);
$return_rate = displayPercentage($return_rate);
//Pieces
$sold = strval(round($sold, 0));
}
}
if ($row_id == '') {
$row_id = '<span class="notice">N/A</span>';
}
$row = array();
$row['w150 tac 1'] = $row_id;
$row['w080 tac 4'] = $sold;
$row['w150 tar 5'] = $net_sales;
$row['w080 tar 6'] = $net_sales_ratio;
$row['w100 tar 7'] = $price_average;
$row['w080 tar 8'] = $margin_average;
$row['w150 tar 9'] = $profit;
$row['w080 tar 10'] = $profit_ratio;
$row['w080 tar 12'] = $return_rate;
if ($is_header) {
foreach ($row as $col_key => $col_val) {
$row[$col_key] = str_replace('{CURRENCY}', CURRENCY_DEFAULT, $col_val);
}
}
return $row;
}
示例9: displayCurrency
<?php
$cb_amount = displayCurrency('EUR', $cb_amount);
$email_subject = 'Wir haben Ihr Kundenkonto ausgeglichen';
$email_text_array = array();
$email_text_array[] = 'Guten Tag ' . $to_name . ',';
$email_text_array[] = 'wir haben soeben den offenen Betrag Ihrer Bestellung mit der Referenznummer ' . $order_id . ' angewiesen. Bitte beachten Sie, dass es je nach Kreditinstitut einige Tage in Anspruch nehmen kann bis der Betrag auf Ihrem Konto eingeht.';
$email_text_array[] = 'Wir freuen uns Sie bald wieder als Kunden begrüßen zu dürfen. Täglich stellen wir neue Produkte ein. Da ist sicher auch wieder etwas für Sie dabei. Besuchen Sie uns doch einfach mal wieder!';
$email_text_array[] = 'Bei Fragen, Anregungen oder Problemen schreiben Sie einfach an ' . EMAIL_ADDRESS_OTTODECUST . '.';
$email_text = '';
if (MAILTYPE == 'HTML') {
foreach ($email_text_array as $eta) {
$email_text .= '<p>' . $eta . '</p>';
}
$email_text .= '<p>' . nl2br(EMAIL_FOOTER_TEXT) . '</p>';
} else {
foreach ($email_text_array as $eta) {
$email_text .= $eta . "\n\n";
}
$email_text .= EMAIL_FOOTER_TEXT;
}
示例10: loadComboList
$row_template .= '</tr>';
$width = $sort_option == 'msws' ? '1030' : '975';
//$content .= '<div style="position:absolute;left:600px;top:85px;"><input type="button" id="print-stock" value="Print Stock List" /></div>';
$content .= '<div style="margin-bottom:10px;width:' . $width . 'px;"><form name="frm_sort" action="?open=elements-stock-list" method="post">';
$content .= '<div style="float:right;">';
$content .= '<table class="form" border="0" cellpadding="0" cellspacing="0" style="margin-bottom:10px;">';
$content .= '<tr><td width="150"><strong>Filter by Category</strong></td>';
$content .= '<td><select name="elcat-filter" class="input" onchange="frm_sort.submit();">';
$content .= '<option value="">Show All</option>';
$content .= loadComboList('element_category', 'element_category_id', 'name', $elcatfiltered);
$content .= '</select></td></tr>';
$content .= '</table>';
$content .= '<table border="0" cellpadding="0" cellspacing="0" style="background:#eee;">';
$content .= '<tr><td rowspan="2"><input type="button" id="print-stock" value="Print Stock List" /></td>';
$content .= '<td><h3>Average DIOH</h3></td><td><h3>: <span id="avg-dioh">' . $dioh_average . '</span></h3></td></tr>';
$content .= '<tr><td><h3>Total Stock Value</h3></td><td><h3>: <span id="total-price">' . displayCurrency('EUR', $total_total) . '</span></h3></td></tr>';
$content .= '</table></div>';
$content .= '<strong>Sort by </strong><select id="sort_option" name="sort_option" onchange="frm_sort.submit();">';
foreach ($sort_options as $value => $option) {
$sel = $sort_option == $value ? 'selected="selected"' : '';
$content .= '<option value="' . $value . '" ' . $sel . '>' . $option . '</option>';
}
$content .= '</select>';
$content .= '</form></div>';
$content .= '<div style="clear:both;"> </div>';
$content .= tep_draw_table('proman sticky-tablehead', $table);
$content .= '<div id="showopt" class="bold">';
$content .= '<div id="showmore">» Show <span class="show">' . $show_amount . '</span> more out of <span class="more"></span></div>';
$content .= '<div id="showall">» Show ALL (<span class="more"></span>)</div>';
$content .= '</div>';
// #showopt
示例11: displayCurrency
// } else {
// $packcode = $p['package_code'];
// }
// $form .= '<div>'.$del.$id.' <a href="'.$packlink.'">'.$packcode.'</a></div>';
// }
// }
// $win_pack = new ui_window($title, $form);
// $win_pack->ui_setWindowWidth($left_window_size);
// $result .= '<div> </div>';
// $result .= $win_pack->ui_print();
// }
$log_total_ged = $class_ml->retrieveContentsTotal($logistic_id, 'GED');
$log_total_dhl = $class_ml->retrieveContentsTotal($logistic_id, 'DHL', $use_cogs);
}
$result .= '<input type="hidden" id="log_value_ged_hidden" value="' . displayCurrency('EUR', $log_total_ged) . '" />';
$result .= '<input type="hidden" id="log_value_dhl_hidden" value="' . displayCurrency('EUR', $log_total_dhl) . '" />';
echo utf8_encode($result);
} elseif ($_POST['me_action'] == 'SETSENT') {
$logistic_id = tep_db_prepare_input($_POST['logistic_id']);
$packages = $class_ml->retrievePackages($logistic_id, true);
foreach ($packages as $type => $pack) {
if ($type == 'P') {
use_class('jng_sp_packages');
$class_jp = new jng_sp_packages();
use_class('jng_sp_orders');
$class_jo = new jng_sp_orders();
foreach ($pack as $p) {
$items = $class_jp->sendPackage($p['packages_id']);
foreach ($items as $items_id) {
$class_jo->updateItemStatus($items_id, '7', $session_userinfo['username']);
}
示例12: displayCellValue
function displayCellValue($value)
{
global $currency, $show_as_sales;
return $show_as_sales ? displayCurrency($currency, $value) : strval(intval($value));
}
示例13: foreach
$content .= '<table class="analysis" border="0" cellpadding="0" cellspacing="0">';
$content .= '<tr>';
$content .= '<th><sub>Price</sub>\\<sup>Ret.Rate</sup></th>';
foreach ($return_rate_collection as $rr) {
$content .= '<th>' . $rr . '%</th>';
}
$content .= '</tr>';
foreach ($price_collection as $price) {
$price_id = 'P' . str_replace('.', 'C', $price);
if ($price_id == $default_price_id) {
$classrow = 'class="bg-green"';
} else {
$classrow = isset($cat_data[$price_id]) ? 'class="e"' : '';
}
$content .= '<tr ' . $classrow . '>';
$content .= '<td>' . displayCurrency('EUR', $price) . '</td>';
foreach ($return_rate_collection as $rr) {
$rr_id = 'R' . str_replace('.', 'C', $rr);
//$div_point = $data_vc_piece[$default_price_id][$rr_id];
$div_point = $data_vc_piece[$default_price_id][$default_rr_id];
$rule1 = $price == $default_price && $rr == $default_return_rate;
$rule2 = $price < $default_price;
$rule3 = $div_point <= 0 || $data_vc_piece[$price_id][$rr_id] < 0;
if ($rule1) {
$sales_percent = 'CURRENT';
} elseif ($rule3) {
$sales_percent = '-';
} else {
$sales_percent = number_format($div_point / $data_vc_piece[$price_id][$rr_id] * 100, 1);
$sales_percent .= '%';
}
示例14: array
//$email_text_array[4] = 'Bitte überweisen Sie den Betrag von '.displayCurrency('EUR', $total).' auf das folgende Konto:';
//$email_text_array[5] = 'Kontoinhaber: '.MODULE_PAYMENT_TRANSFER_PAYTO."\n";
//$email_text_array[5] .= 'Kontonummer: '.MODULE_PAYMENT_TRANSFER_ACCOUNT."\n";
//$email_text_array[5] .= 'Kreditinstitut: '.MODULE_PAYMENT_TRANSFER_BANK."\n";
//$email_text_array[5] .= 'Bankleitzahl: '.MODULE_PAYMENT_TRANSFER_BRANCH."\n";
//$email_text_array[5] .= 'Verwendungszweck: '.$payone_txid."\n\n";
//$email_text_array[5] .= 'Nur für Auslandszahlungen: '.MODULE_PAYMENT_TRANSFER_INTERNATIONAL_CODE."\n";
//$email_text_array[5] .= 'IBAN-Nummer: '.MODULE_PAYMENT_TRANSFER_IBAN."\n";
//$email_text_array[6] = 'Sollten Sie in den Betrag bereits in den letzten Tagen überwiesen haben, betrachten Sie bitte diese Email als gegenstandslos. Wenn wir bis zum '.tep_date_long($canceldue).' keine Zahlung von Ihnen erhalten, gehen wir davon aus, dass Sie an der Bestellung nicht mehr interessiert sind und stornieren diese.';
//$email_text = '';
$email_text_array = array();
$email_text_array[0] = 'Guten Tag ' . $to_name . ',';
$email_text_array[1] = 'vielen Dank für Ihre Bestellung ' . $order_no . ' vom ' . $order_date . ' bei JULIE & GRACE über ' . $otto_link . '.';
$email_text_array[2] = 'Sie haben bei der Bezahlweise „Vorkasse“ ausgewählt, aber leider konnten wir bis heute auf unserem Konto noch keinen Zahlungseingang von Ihnen feststellen.';
$email_text_array[3] = 'Bitte haben Sie Verständnis, dass wir mit der Bearbeitung Ihrer Bestellung erst nach Zahlungseingang beginnen.';
$email_text_array[4] = 'Bitte überweisen Sie den Betrag von ' . displayCurrency('EUR', $total) . ' auf das folgende Konto:';
$email_text_array[5] = 'Verwendungszweck: ' . $payone_txid . "\n\n";
$email_text_array[6] = nl2br(displayBankAccountInfo());
$email_text_array[7] = 'Sollten Sie in den Betrag bereits in den letzten Tagen überwiesen haben, betrachten Sie bitte diese Email als gegenstandslos. Wenn wir bis zum ' . tep_date_long($canceldue) . ' keine Zahlung von Ihnen erhalten, gehen wir davon aus, dass Sie an der Bestellung nicht mehr interessiert sind und stornieren diese.';
$email_text = '';
if (MAILTYPE == 'HTML') {
foreach ($email_text_array as $eta) {
$email_text .= '<p>' . nl2br($eta) . '</p>';
}
$email_text .= '<p>' . nl2br(EMAIL_FOOTER_TEXT_2) . '</p>';
} else {
foreach ($email_text_array as $eta) {
$email_text .= $eta . "\n\n";
}
$email_text .= EMAIL_FOOTER_TEXT_2;
}
示例15: generatePricePreview
/**
* A static function to generate preview for displaying product price
* @param Float $price_old Old price of product (if discounted)
* @param Float $price Selling price of product
* @return String
*/
public static function generatePricePreview($price_old, $price)
{
if ($price_old > $price) {
$preview = '<span class="notice deleted">' . displayCurrency(CURRENCY_DEFAULT, $price_old) . '</span><br />' . '<span class="red">' . displayCurrency(CURRENCY_DEFAULT, $price) . '</span>';
} else {
$preview = displayCurrency(CURRENCY_DEFAULT, $price);
}
return '<strong>' . $preview . '</strong>';
}