本文整理汇总了PHP中getCurrencySymbol函数的典型用法代码示例。如果您正苦于以下问题:PHP getCurrencySymbol函数的具体用法?PHP getCurrencySymbol怎么用?PHP getCurrencySymbol使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getCurrencySymbol函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: number_format
$pdf->AddCol('item', '50%', 'Item', 'L');
$pdf->AddCol('pr_qty', '15%', 'Quantity', 'R');
$pdf->AddCol('pr_rate', '15%', 'Rate', 'R');
$pdf->AddCol('amt', '15%', 'Amount', 'R');
$pdf->Table($data, $prop);
$_cMargin = $pdf->cMargin;
$pdf->cMargin = $prop['padding'];
$pdf->SetFont($prop['thfont'][0], $prop['thfont'][1], $prop['thfont'][2]);
$width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
$cellSize = 0.01 * $width;
$pdf->Cell($cellSize * 45, 6, 'Total', 0, 0, 'C', false);
$pdf->Cell($cellSize * 20, 6, number_format($total['qty']), 0, 0, 'R', false);
$pdf->Cell($cellSize * 15, 6, '', 0, 0, 'L', false);
$pdf->Cell($cellSize * 20, 6, number_format($total['amt']), 0, 0, 'R', false);
$pdf->Ln();
$pdf->Cell($cellSize * 100, 5, convertCurrency($total['amt'], getCurrencySymbol($_SESSION['company_id'])) . " only", 0, 0, 'L');
$pdf->Ln();
$pdf->cMargin = $_cMargin;
}
$mysqli->close();
$pdf->Output("purchase_return.pdf", "D");
} else {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="../images/logo_icon.gif">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../stylesheets/style.css" rel="stylesheet" type="text/css" />
<title><?php
echo $_SESSION['companyname'];
示例2: function
]
},
yAxis: {
labels: {
formatter: function() {
var value = this.value,
ret;
if (value > 1000000) {
ret = (value / 1000000) +'M';
} else if (value > 1000) {
ret = (value / 1000) +'K';
} else {
ret = value;
}
return '<?php
echo getCurrencySymbol($_GET['company_id']);
?>
' + ret;
}
},
title: {
text: 'Amount'
},
min: <?php
echo $min;
?>
,
max: <?php
echo $max;
?>
},
示例3: get_service_list_values
//.........这里部分代码省略.........
$entity_ids_list = array();
$show_all = show_all($modulename);
if (!validateSession($id, $sessionid)) {
return null;
}
if ($only_mine == 'true' || $show_all == 'false') {
array_push($entity_ids_list, $id);
} else {
$contactquery = "SELECT contactid, parentid FROM vtiger_contactdetails " . " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid" . " AND vtiger_crmentity.deleted = 0 " . " WHERE (parentid = (SELECT parentid FROM vtiger_contactdetails WHERE contactid = ?) AND parentid != 0) OR contactid = ?";
$contactres = $adb->pquery($contactquery, array($id, $id));
$no_of_cont = $adb->num_rows($contactres);
for ($i = 0; $i < $no_of_cont; $i++) {
$cont_id = $adb->query_result($contactres, $i, 'contactid');
$acc_id = $adb->query_result($contactres, $i, 'parentid');
if (!in_array($cont_id, $entity_ids_list)) {
$entity_ids_list[] = $cont_id;
}
if (!in_array($acc_id, $entity_ids_list) && $acc_id != '0') {
$entity_ids_list[] = $acc_id;
}
}
}
$focus = new Services();
$focus->filterInactiveFields('Services');
foreach ($focus->list_fields as $fieldlabel => $values) {
foreach ($values as $table => $fieldname) {
$fields_list[$fieldlabel] = $fieldname;
}
}
$fields_list['Related To'] = 'entityid';
$query = array();
$params = array();
$query[] = "select vtiger_service.*," . "case when vtiger_crmentityrel.crmid != vtiger_service.serviceid then vtiger_crmentityrel.crmid else vtiger_crmentityrel.relcrmid end as entityid, " . "'' as setype from vtiger_service " . "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_service.serviceid " . "left join vtiger_crmentityrel on (vtiger_crmentityrel.relcrmid=vtiger_service.serviceid or vtiger_crmentityrel.crmid=vtiger_service.serviceid) " . "where vtiger_crmentity.deleted = 0 and " . "( vtiger_crmentityrel.crmid in (" . generateQuestionMarks($entity_ids_list) . ") OR " . "(vtiger_crmentityrel.relcrmid in (" . generateQuestionMarks($entity_ids_list) . ") AND vtiger_crmentityrel.module = 'Services')" . ")";
$params[] = array($entity_ids_list, $entity_ids_list);
$checkQuotes = checkModuleActive('Quotes');
if ($checkQuotes == true) {
$query[] = "select distinct vtiger_service.*,\n\t\t\tvtiger_quotes.accountid as entityid,\n\t\t\t'Accounts' as setype\n\t\t\tfrom vtiger_quotes INNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_quotes.quoteid\n\t\t\tleft join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_quotes.quoteid\n\t\t\tleft join vtiger_service on vtiger_service.serviceid = vtiger_inventoryproductrel.productid\n\t\t\twhere vtiger_inventoryproductrel.productid = vtiger_service.serviceid AND vtiger_crmentity.deleted=0 and accountid in (" . generateQuestionMarks($entity_ids_list) . ")";
$params[] = array($entity_ids_list);
}
$checkInvoices = checkModuleActive('Invoice');
if ($checkInvoices == true) {
$query[] = "select distinct vtiger_service.*, vtiger_invoice.accountid as entityid, 'Accounts' as setype\n\t\t\tfrom vtiger_invoice\n\t\t\tINNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid\n\t\t\tleft join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_invoice.invoiceid\n\t\t\tleft join vtiger_service on vtiger_service.serviceid = vtiger_inventoryproductrel.productid\n\t\t\twhere vtiger_inventoryproductrel.productid = vtiger_service.serviceid AND vtiger_crmentity.deleted=0 and accountid in (" . generateQuestionMarks($entity_ids_list) . ")";
$params[] = array($entity_ids_list, $entity_ids_list);
}
$ServicesfieldVisibilityPermissions = array();
foreach ($fields_list as $fieldlabel => $fieldname) {
$ServicesfieldVisibilityPermissions[$fieldname] = getFieldVisibilityPermission('Services', $current_user->id, $fieldname);
}
$fieldValuesToRound = array('unit_price', 'commissionrate');
for ($k = 0; $k < count($query); $k++) {
$res[$k] = $adb->pquery($query[$k], $params[$k]);
$noofdata[$k] = $adb->num_rows($res[$k]);
if ($noofdata[$k] == 0) {
$output[$k][$modulename]['data'] = '';
}
for ($j = 0; $j < $noofdata[$k]; $j++) {
$i = 0;
foreach ($fields_list as $fieldlabel => $fieldname) {
$fieldper = $ServicesfieldVisibilityPermissions[$fieldname];
if ($fieldper == '1' && $fieldname != 'entityid') {
continue;
}
$output[$k][$modulename]['head'][0][$i]['fielddata'] = Vtiger_Language_Handler::getTranslatedString($fieldlabel, 'Services', vglobal('default_language'));
$fieldvalue = $adb->query_result($res[$k], $j, $fieldname);
$fieldid = $adb->query_result($res[$k], $j, 'serviceid');
if (in_array($fieldname, $fieldValuesToRound)) {
$fieldvalue = round($fieldvalue, 2);
}
if ($fieldname == 'entityid') {
$crmid = $fieldvalue;
$module = $adb->query_result($res[$k], $j, 'setype');
if ($module == '') {
$module = $adb->query_result($adb->pquery("SELECT setype FROM vtiger_crmentity WHERE crmid = ?", array($crmid)), 0, 'setype');
}
if ($crmid != '' && $module != '') {
$fieldvalues = getEntityName($module, array($crmid));
if ($module == 'Contacts') {
$fieldvalue = '<a href="index.php?module=Contacts&action=index&id=' . $crmid . '">' . $fieldvalues[$crmid] . '</a>';
} elseif ($module == 'Accounts') {
$fieldvalue = '<a href="index.php?module=Accounts&action=index&id=' . $crmid . '">' . $fieldvalues[$crmid] . '</a>';
}
} else {
$fieldvalue = '';
}
}
if ($fieldname == 'servicename') {
$fieldvalue = '<a href="index.php?module=Services&action=index&id=' . $fieldid . '">' . $fieldvalue . '</a>';
}
if ($fieldname == 'unit_price') {
$sym = getCurrencySymbol($res[$k], $j, 'currency_id');
$fieldvalue = $sym . $fieldvalue;
}
$output[$k][$modulename]['data'][$j][$i]['fielddata'] = $fieldvalue;
$i++;
}
}
}
$log->debug("Exiting customerportal function get_product_list_values.....");
return $output;
}
示例4: convertCurrency
$pdf->printHeader();
$cMargin = $pdf->cMargin;
$pdf->cMargin = $prop['padding'];
$pdf->AddCol('sno', '6%', 'S.No.', 'L');
$pdf->AddCol('cno', '6%', 'Cno', 'L');
$pdf->AddCol('manufacturer_no', '15%', 'Part No', 'L');
$pdf->AddCol('i_name', '40%', 'Description', 'L');
$pdf->AddCol('raw_qty', '7%', 'Qty', 'R');
$pdf->AddCol('sales_rate', '8%', 'Rate', 'R');
$pdf->AddCol('discount_value', '8%', 'Discount', 'R');
$pdf->AddCol('net', '10%', 'Amount', 'R');
$pdf->Table($ddata, $prop);
$pdf->SetFont($prop['thfont'][0], $prop['thfont'][1], $prop['thfont'][2]);
$cellSize = 1 / 100 * $pdf->TableWidth;
$pdf->SetX($pdf->lMargin);
$pdf->Cell($cellSize * 75, 5, convertCurrency($net, getCurrencySymbol($_SESSION['company_id'])) . " only", 0, 0, 'L');
$pdf->Cell($cellSize * 25, 5, number_format($net, 0), 0, 0, 'R');
$pdf->Ln();
$pdf->cMargin = $cMargin;
}
}
$mysqli->close();
$fileName = "sales_invoice";
if (isset($_GET['invoice']) && strlen($_GET['invoice']) > 0) {
$fileName .= "_{$_GET['invoice']}";
} else {
if (isset($_GET['party']) && strlen($_GET['party']) > 0) {
$fileName .= "_{$_GET['party']}";
}
}
$pdf->Output("{$fileName}.pdf", "D");
示例5: loadBox
/**
* Charge les donnees en memoire pour affichage ulterieur
*
* @param int $max Maximum number of records to load
* @return void
*/
function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
$totalMnt = 0;
$totalnb = 0;
include_once DOL_DOCUMENT_ROOT . "/compta/facture/class/facture.class.php";
include_once DOL_DOCUMENT_ROOT . "/comm/propal/class/propal.class.php";
include_once DOL_DOCUMENT_ROOT . "/commande/class/commande.class.php";
$facturestatic = new Facture($db);
$propalstatic = new Propal($db);
$commandestatic = new Commande($db);
$textHead = $langs->trans("Activity") . " " . date("Y");
$this->info_box_head = array('text' => $textHead, 'limit' => dol_strlen($textHead));
// list the summary of the bills
if ($conf->facture->enabled && $user->rights->facture->lire) {
$sql = "SELECT f.paye, f.fk_statut, sum(f.total_ttc) as Mnttot, count(*) as nb";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s," . MAIN_DB_PREFIX . "facture as f";
$sql .= " WHERE f.entity = " . $conf->entity;
$sql .= " AND f.fk_soc = s.rowid";
$sql .= " AND (DATE_FORMAT(f.datef,'%Y') = " . date("Y") . " or paye=0)";
$sql .= " GROUP BY f.paye, f.fk_statut ";
$sql .= " ORDER BY f.fk_statut DESC";
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$now = dol_now();
$i = 0;
while ($i < $num) {
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'bill');
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $langs->trans("Bills") . " " . $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 0));
if ($objp->fk_statut == 0) {
// draft
$billurl = "viewstatut=0&paye=0";
} elseif ($objp->fk_statut == 1) {
// unpaid
$billurl = "viewstatut=1&paye=0";
} else {
// paid for current year
$billurl = "viewstatut=2&paye=1";
}
$this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => $objp->nb, 'url' => DOL_URL_ROOT . "/compta/facture/list.php?" . $billurl . "&mainmenu=accountancy&leftmenu=customers_bills");
$totalnb += $objp->nb;
$this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '), 40) . " " . getCurrencySymbol($conf->currency));
$totalMnt += $objp->Mnttot;
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3));
$i++;
}
if ($num == 0) {
$this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoRecordedInvoices"));
}
} else {
$this->info_box_contents[0][0] = array('td' => 'align="left"', 'maxlength' => 500, 'text' => $db->error() . ' sql=' . $sql);
}
}
// list the summary of the orders
if ($conf->commande->enabled && $user->rights->commande->lire) {
$sql = "SELECT c.fk_statut,c.facture, sum(c.total_ttc) as Mnttot, count(*) as nb";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s, " . MAIN_DB_PREFIX . "commande as c";
$sql .= " WHERE c.entity = " . $conf->entity;
$sql .= " AND c.fk_soc = s.rowid";
$sql .= " AND c.facture=0";
$sql .= " GROUP BY c.fk_statut";
$sql .= " ORDER BY c.fk_statut DESC";
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result) + $i;
while ($i < $num) {
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'object_order');
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $langs->trans("Orders") . " " . $commandestatic->LibStatut($objp->fk_statut, $objp->facture, 0));
$this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => $objp->nb, 'url' => DOL_URL_ROOT . "/commande/liste.php?mainmenu=commercial&leftmenu=orders&viewstatut=" . $objp->fk_statut);
$totalnb += $objp->nb;
$this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '), 40) . " " . getCurrencySymbol($conf->currency));
$totalMnt += $objp->Mnttot;
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($objp->fk_statut, $objp->facture, 3));
$i++;
}
}
}
// list the summary of the propals
if ($conf->propal->enabled && $user->rights->propal->lire) {
$sql = "SELECT p.fk_statut, sum(p.total) as Mnttot, count(*) as nb";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s, " . MAIN_DB_PREFIX . "propal as p";
$sql .= " WHERE p.entity = " . $conf->entity;
$sql .= " AND p.fk_soc = s.rowid";
$sql .= " AND DATE_FORMAT(p.datep,'%Y') = " . date("Y");
$sql .= " AND p.date_cloture IS NULL ";
// just unclosed
$sql .= " GROUP BY p.fk_statut";
$sql .= " ORDER BY p.fk_statut DESC";
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result) + $i;
//.........这里部分代码省略.........
示例6: img_warning
} else {
print img_warning() . ' <font class="error">' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")) . '</font>';
}
print '</td></tr>';
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("State") . '</td><td>';
if ($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT) {
print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT);
} else {
print ' ';
}
print '</td></tr>';
$var = !$var;
print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("CompanyCurrency") . '</td><td>';
print currency_name($conf->currency, 1);
print ' (' . getCurrencySymbol($conf->currency) . ')';
print '</td></tr>';
$var = !$var;
print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Tel") . '</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL, $mysoc->country_code) . '</td></tr>';
$var = !$var;
print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Fax") . '</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX, $mysoc->country_code) . '</td></tr>';
$var = !$var;
print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Mail") . '</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL, 0, 0, 0, 80) . '</td></tr>';
// Web
$var = !$var;
print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Web") . '</td><td>' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB, '_blank', 80) . '</td></tr>';
// Barcode
if (!empty($conf->barcode->enabled)) {
$var = !$var;
print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Gencod") . '</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
}
示例7: save
//.........这里部分代码省略.........
$password = JRequest::getVar('password', "");
$email = JRequest::getVar('email', "");
$errorMsg = $usermodel->checkAccount($username, $password, $email, $userid, $conf);
if (isset($errorMsg)) {
$this->reloadForm($content, $errorMsg);
}
$user->id = $userid;
}
//Valid account or visitor are allowed to post
if ($user->id != 0 || $conf->submission_type == 2) {
$content->userid = $user->id;
} else {
//trying to save ad, without being registered
return;
}
if (function_exists("getPaidSystemMode")) {
$mode = getPaidSystemMode();
} else {
$mode = "nopaidsystem";
}
$total = 0;
switch ($mode) {
case "credits":
computeCost($total, $items, $content, $conf, $isUpdateMode);
if ($total == 0) {
$content->save();
} else {
if (checkCredits($total, $user->id) == true) {
//TODO ?
//generateBill($content,$total,$items,$mode,"ok");
removeCredits($user->id, $total, $items, 'Adsmanager');
$content->save();
} else {
$errorMsg = sprintf(JText::_('PAIDSYSTEM_NOT_ENOUGH_CREDITS'), strtolower(getCurrencySymbol()));
$this->reloadForm($content, $errorMsg);
}
}
break;
case "payperad":
$adid = $content->savePending();
$content->isPending = true;
computeCost($total, $items, $content, $conf, $isUpdateMode);
if ($total == 0) {
$content->save();
} else {
$invoice_id = generateBill($content, $items, $adid);
}
break;
case "nopaidsystem":
$content->save();
break;
}
// We need to put "pending or new values" in the $content obj instead of $content->data
$content->map();
if ($mode == "payperad" && $total > 0 && $isUpdateMode == 0) {
if (@$conf->preview == 1) {
$app->redirect('index.php?option=com_adsmanager&view=preview&id=' . $adid);
} else {
Invoicing::redirectToPayment($invoice_id);
//$app->redirect( 'index.php?option=com_paidsystem&view=payment');
}
} else {
if (@$conf->preview == 1 && JRequest::getInt('pending', 0) == 1) {
$app->redirect('index.php?option=com_adsmanager&view=preview&id=' . $adid);
} else {
if ($mode == "payperad" && $total > 0 && $isUpdateMode == 1) {
示例8: getRelatedSalesOrderItems
/**
* Get related SalesOrder items
*
* @param int $crmid salesorder id
* @return array $array[index][fieldname] = fieldvalue
*/
function getRelatedSalesOrderItems($crmid)
{
global $adb, $log;
$log->debug("Entering customer portal function getRelatedSalesOrderItems");
$module = 'Products';
$sc_info = array();
if (vtlib_isModuleActive($module) !== true) {
return $sc_info;
}
$query = "SELECT vtiger_inventoryproductrel.*, vtiger_products.* " . "FROM vtiger_inventoryproductrel " . "INNER JOIN vtiger_products ON vtiger_inventoryproductrel.productid = vtiger_products.productid " . "INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_inventoryproductrel.productid AND vtiger_crmentity.deleted = 0 " . "WHERE vtiger_inventoryproductrel.id = ?";
$res = $adb->pquery($query, array($crmid));
$rows = $adb->num_rows($res);
for ($i = 0; $i < $rows; $i++) {
$qty = $adb->query_result($res, $i, 'quantity');
$sc_info[$i]['productid' . $adb->query_result($res, $i, 'productid')] = $qty;
$sc_info[$i][getTranslatedString('LBL_PRODUCT_CODE', $module)] = $adb->query_result($res, $i, 'product_no');
$sc_info[$i][getTranslatedString('LBL_PRODUCT_NAME', $module)] = $adb->query_result($res, $i, 'productname');
$sym = getCurrencySymbol($res, $i, 'currency_id');
$listprice = $adb->query_result($res, $i, 'listprice');
$sc_info[$i][getTranslatedString('LBL_PB_LIST_PRICE', 'SalesOrder')] = getCurrencyValue($sym, $listprice);
$sc_info[$i][getTranslatedString('Quantity', 'SalesOrder')] = number_format($qty);
}
$log->debug("Exiting customerportal function getRelatedSalesOrderItems");
return $sc_info;
}
示例9: array
$ndata["{$user_id}"]['company_ref_id'] = $row['company_ref_id'];
$ndata["{$user_id}"]['data'] = array();
}
$arr = array();
$arr['account_name'] = $row['account_name'];
$arr['debit_amount'] = $row['debit_amount'] * 1;
$ndata["{$user_id}"]['data'][] = $arr;
}
dump($ndata);
include_once '../../Classes/Telenor.php';
$telenor = new Telenor('923458219245', '7264');
//$telenor->setMask('NEXEXCEL');
$sms_template_1 = "Dear %s %s, You have %d Cheque as of %s for a total of %s %s from\n";
$sms_template_2 = "%s - %s %s\n";
foreach ($ndata as $user_id => $data) {
$currencyCode = getCurrencySymbol($data['company_ref_id']);
$total = (double) 0;
$sms = "";
foreach ($data['data'] as $row) {
$total += $row['debit_amount'];
$sms .= sprintf($sms_template_2, $row['account_name'], $currencyCode, number_format($row['debit_amount']));
}
$sms = trim(sprintf($sms_template_1, $data['first_name'], $data['last_name'], count($data['data']), date("d-M-y"), $currencyCode, number_format($total)) . $sms);
$ret = $telenor->sendSms($data['mobile_number'], $sms);
if ($ret === false) {
$error = $telenor->getError();
dump($error);
}
}
}
$out = ob_get_contents();
示例10: function
if ('<?php
echo $_SESSION['do_restrict'];
?>
' == 'Yes') {
var $item = $('#item_'+i+"_hidden");
var $rate = $('#inp3_'+i);
if ($rate.val() != '' && $rate.val() > 0) {
$.ajax({
url: "../transaction/rates.php",
async: false,
data: "restrict=" + $item.val() + "",
dataType: 'json',
success: function(data) {
if (data.restrict_rate > 0 && $rate.val() < data.restrict_rate) {
err += "Rate for Item '" + item.value + " should be greater than <?php
echo getCurrencySymbol($_SESSION['company_id']);
?>
" + data.restrict_rate + sep;
ret = false;
}
}
});
} else {
err += "Please specify the rate for Item '" + item.value + "" + sep;
ret = false;
}
} else {
break;
}
}
}
示例11: selectcurrency
/**
* Retourne la liste des devises, dans la langue de l'utilisateur
*
* @param string $selected preselected currency code
* @param string $htmlname name of HTML select list
* @return void
*/
function selectcurrency($selected = '', $htmlname = 'currency_id')
{
global $conf, $langs, $user;
$langs->load("dict");
$this->load_cache_currencies();
$out = '';
if ($selected == 'euro' || $selected == 'euros') {
$selected = 'EUR';
}
// Pour compatibilite
$out .= '<select class="flat" name="' . $htmlname . '">';
foreach ($this->cache_currencies as $code_iso => $currency) {
if ($selected && $selected == $code_iso) {
$out .= '<option value="' . $code_iso . '" selected="selected">';
} else {
$out .= '<option value="' . $code_iso . '">';
}
$out .= $currency['label'];
$out .= ' (' . getCurrencySymbol($code_iso) . ')';
$out .= '</option>';
}
$out .= '</select>';
if ($user->admin) {
$out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"), 1);
}
return $out;
}
示例12: strtoupper
} else {
if ($fieldlist[$field] == 'libelle' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX . 'c_input_method') {
$langs->load("orders");
$key = $langs->trans($obj->code);
$valuetoshow = $obj->code && $key != $obj->code ? $key : $obj->{$fieldlist}[$field];
} else {
if ($fieldlist[$field] == 'libelle' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX . 'c_shipment_mode') {
$langs->load("sendings");
$key = $langs->trans("SendingMethod" . strtoupper($obj->code));
$valuetoshow = $obj->code && $key != "SendingMethod" . strtoupper($obj->code) ? $key : $obj->{$fieldlist}[$field];
} else {
if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'pays_id') {
$showfield = 0;
} else {
if ($fieldlist[$field] == 'unicode') {
$valuetoshow = getCurrencySymbol($obj->code);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}