本文整理汇总了PHP中SaleFormatCurrency函数的典型用法代码示例。如果您正苦于以下问题:PHP SaleFormatCurrency函数的具体用法?PHP SaleFormatCurrency怎么用?PHP SaleFormatCurrency使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SaleFormatCurrency函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getView
public static function getView(Order $order, $useCurrentBudget = true)
{
$data = self::prepareData($order);
$result = '<div class="adm-bus-pay">
<div class="adm-bus-component-content-container">
<div class="adm-bus-pay-section">
<div class="adm-bus-pay-section-content posr">
<input type="hidden" value="' . $data['PRICE'] . '" id="sale-order-financeinfo-price">
<input type="hidden" value="' . $data['SUM_PAID'] . '" id="sale-order-financeinfo-sum-paid">
<input type="hidden" value="' . $data['PAYABLE'] . '" id="sale-order-financeinfo-payable">
<table class="adm-bus-pay-statuspay " ' . (isset($data['OVERPAYMENT']) ? 'style="width: 1000px"' : '') . '>
<thead>
<tr>
<td>' . Loc::getMessage('SALE_ORDER_FINANCEINFO_FOR_PAYMENT') . '</td>
<td class="separator"></td>
<td style="color: #749511;">' . Loc::getMessage('SALE_ORDER_FINANCEINFO_SUM_PAID') . '</td>
<td class="separator"></td>
<td style="color: #f29129;">' . Loc::getMessage('SALE_ORDER_FINANCEINFO_PAYABLE') . '</td>
</tr>
</thead>
<tbody>
<tr>
<td id="sale-order-financeinfo-price-view">' . SaleFormatCurrency(floatval($data['PRICE']), $data['CURRENCY']) . '</td>
<td class="separator"></td>
<td id="sale-order-financeinfo-sum-paid-view">' . SaleFormatCurrency(floatval($data['SUM_PAID']), $data['CURRENCY']) . '</td>
<td class="separator"></td>
<td id="sale-order-financeinfo-payable-view">' . SaleFormatCurrency(floatval($data['PAYABLE']), $data['CURRENCY']) . '</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="adm-bus-pay-section"' . (floatval($data['BUYER_BUDGET']) <= 0 ? ' style="display:none;"' : '') . '>
<input id="sale-order-financeinfo-user-budget-input" type="hidden" value="' . floatval($data['BUYER_BUDGET']) . '">
<div class="adm-bus-pay-section-content posr">
<div class="adm-bus-pay-wallet">
' . Loc::getMessage('SALE_ORDER_FINANCEINFO_BALANCE_INNER_BUDGET') . ': <strong id="sale-order-financeinfo-user-budget">' . SaleFormatCurrency($data['BUYER_BUDGET'], $data['CURRENCY']) . '</strong>';
if ($useCurrentBudget) {
$result .= '<span class="adm-bus-pay-use-current-budget" onclick="BX.Sale.Admin.GeneralPayment.useCurrentBudget(this);">' . Loc::getMessage('SALE_ORDER_FINANCEINFO_USE_INNER_BUDGET') . '</span>';
}
$result .= '</div>
</div>
</div>
</div>
</div>';
return $result;
}
示例2: ShowError
if (!CModule::IncludeModule("sale")) {
ShowError(GetMessage("SALE_MODULE_NOT_INSTALL"));
return;
}
$arParams["PATH_TO_BASKET"] = Trim($arParams["PATH_TO_BASKET"]);
$arParams["PATH_TO_ORDER"] = Trim($arParams["PATH_TO_ORDER"]);
$dbBaket = CSaleBasket::GetList(array("NAME" => "ASC"), array("FUSER_ID" => CSaleBasket::GetBasketUserID(), "LID" => SITE_ID, "ORDER_ID" => "NULL"));
$bReady = False;
$bDelay = False;
$bNotAvail = False;
$bSubscribe = False;
$arItems = array();
while ($arBasket = $dbBaket->GetNext()) {
if ($arBasket["DELAY"] == "N" && $arBasket["CAN_BUY"] == "Y") {
$bReady = True;
} elseif ($arBasket["DELAY"] == "Y" && $arBasket["CAN_BUY"] == "Y") {
$bDelay = True;
} elseif ($arBasket["CAN_BUY"] == "N" && $arBasket["SUBSCRIBE"] == "N") {
$bNotAvail = True;
} elseif ($arBasket["CAN_BUY"] == "N" && $arBasket["SUBSCRIBE"] == "Y") {
$bSubscribe = True;
}
$arBasket["PRICE_FORMATED"] = SaleFormatCurrency($arBasket["PRICE"], $arBasket["CURRENCY"]);
$arItems[] = $arBasket;
}
$arResult["READY"] = $bReady ? "Y" : "N";
$arResult["DELAY"] = $bDelay ? "Y" : "N";
$arResult["NOTAVAIL"] = $bNotAvail ? "Y" : "N";
$arResult["SUBSCRIBE"] = $bSubscribe ? "Y" : "N";
$arResult["ITEMS"] = $arItems;
$this->IncludeComponentTemplate();
示例3: SaleFormatCurrency
}
}
} else {
$strErrorTmp .= "Response error. ";
}
}
}
//***************************************************
//*** END ACTION **********************************
//***************************************************
if (!$bNonePay) {
?>
<font class="text" color="#009900"><b>
Thank you for purchasing!<br>
You have been billed <?php
echo SaleFormatCurrency($AMT, "USD");
?>
</b>
</font>
<?php
} else {
if (strlen($strErrorTmp) > 0) {
echo "<font color=\"#FF0000\"><b>" . $strErrorTmp . "</b></font><br>";
}
$noc_def = htmlspecialcharsbx(CSalePaySystemAction::GetParamValue("NOC"));
$address1_def = htmlspecialcharsbx(CSalePaySystemAction::GetParamValue("ADDRESS"));
$zipcode_def = htmlspecialcharsbx(CSalePaySystemAction::GetParamValue("ZIP"));
?>
<script type="text/javascript">
function checkFields(frm)
{
示例4: formatResultTaxes
/**
* Function formats taxes info in arResult
* @return void
*/
protected function formatResultTaxes()
{
$arResult =& $this->arResult;
if (self::isNonemptyArray($arResult['TAX_LIST'])) {
foreach ($arResult["TAX_LIST"] as $k => $tax) {
$tax =& $arResult["TAX_LIST"][$k];
if ($tax["IS_IN_PRICE"] == "Y") {
$tax["VALUE_FORMATED"] = " (" . ($tax["IS_PERCENT"] == "Y" ? "" . doubleval($tax["VALUE"]) . "%, " : "") . Localization\Loc::getMessage("SPOD_SALE_TAX_INPRICE") . ")";
} else {
$tax["VALUE_FORMATED"] = " (" . ($tax["IS_PERCENT"] == "Y" ? "" . doubleval($tax["VALUE"]) . "%" : "") . ")";
}
if (doubleval($tax["VALUE_MONEY"])) {
$tax["VALUE_MONEY_FORMATED"] = SaleFormatCurrency($tax["VALUE_MONEY"], $arResult["CURRENCY"]);
}
}
} else {
$arResult["TAX_LIST"] = array();
}
$arResult["TAX_VALUE_FORMATED"] = SaleFormatCurrency($arResult["TAX_VALUE"], $arResult["CURRENCY"]);
}
示例5: GetMessage
} else {
echo GetMessage("BASKET");
}
?>
</a>
<!--/noindex-->
</div>
<div>
<?php
if ($itemsCount) {
?>
<?php
echo GetMessage('SUMM');
?>
<?php
echo SaleFormatCurrency($summ, $currency);
?>
<?php
} else {
?>
<?php
echo GetMessage("BASKET_EMPTY");
?>
<?php
}
?>
</div>
</div>
<div class="counter_mini"><a href="<?php
echo $arParams["PATH_TO_BASKET"];
?>
示例6: getView
//.........这里部分代码省略.........
echo $isPayment ? 'payment' : 'shipping';
?>
"></div>
<div class="adm-bus-orderdocs-threelist-block-content">
<div class="adm-bus-orderdocs-threelist-block-title">
<?php
if ($isPayment) {
?>
<?php
if ($document->isPaid()) {
?>
<span class="adm-bus-orderdocs-docstatus adm-bus-orderdocs-docstatus-paid"><?php
echo Loc::getMessage('SALE_OANALYSIS_PAYMENT_PAID');
?>
</span>
<?php
} elseif ($document->isReturn()) {
?>
<span class="adm-bus-orderdocs-docstatus"><?php
echo Loc::getMessage('SALE_OANALYSIS_PAYMENT_RETURN');
?>
</span>
<?php
}
?>
<a href="/bitrix/admin/sale_order_payment_edit.php?order_id=<?php
echo $orderId;
?>
&payment_id=<?php
echo $documentId;
?>
" class="adm-bus-orderdocs-threelist-block-title-link">
<?php
echo Loc::getMessage('SALE_OANALYSIS_PAYMENT_TITLE', array('#SYSTEM_NAME#' => htmlspecialcharsbx($document->getField('PAY_SYSTEM_NAME')), '#PAYMENT_ID#' => $documentId, '#SUM#' => SaleFormatCurrency($document->getField('SUM'), $document->getField('CURRENCY'))));
?>
</a>
<?php
} else {
/* shipment*/
?>
<?php
if ($document->isShipped()) {
?>
<span class="adm-bus-orderdocs-docstatus adm-bus-orderdocs-docstatus-shippingallowed"><?php
echo Loc::getMessage('SALE_OANALYSIS_SHIPMENT_SHIPPED');
?>
</span>
<?php
} elseif ($document->isCanceled()) {
?>
<span class="adm-bus-orderdocs-docstatus adm-bus-orderdocs-docstatus-canceled"><?php
echo Loc::getMessage('SALE_OANALYSIS_SHIPMENT_CANCELED');
?>
</span>
<?php
} elseif ($document->isAllowDelivery()) {
?>
<span class="adm-bus-orderdocs-docstatus adm-bus-orderdocs-docstatus-shippingallowed"><?php
echo Loc::getMessage('SALE_OANALYSIS_SHIPMENT_ALLOWED');
?>
</span>
<?php
}
?>
<a href="/bitrix/admin/sale_order_shipment_edit.php?order_id=<?php
echo $orderId;
示例7: loadAvailableList
/**
* @return array
*/
protected function loadAvailableList()
{
$order = $this->getOrder();
$basket = $order->getBasket();
if (!$basket) {
return null;
}
if (!$order->isUsedVat()) {
$taxExemptList = static::loadExemptList($order->getUserId());
$taxRateRes = \CSaleTaxRate::GetList(array("APPLY_ORDER" => "ASC"), array("LID" => $order->getSiteId(), "PERSON_TYPE_ID" => $order->getPersonTypeId(), "ACTIVE" => "Y", "LOCATION" => $order->getTaxLocation()));
while ($taxRate = $taxRateRes->GetNext()) {
if (!in_array(intval($taxRate["TAX_ID"]), $taxExemptList)) {
if ($taxRate["IS_PERCENT"] != "Y") {
$taxRate["VALUE"] = RoundEx(\CCurrencyRates::convertCurrency($taxRate["VALUE"], $taxRate["CURRENCY"], $order->getCurrency()), SALE_VALUE_PRECISION);
$taxRate["CURRENCY"] = $order->getCurrency();
}
$this->availableList[] = $taxRate;
}
}
} else {
$this->availableList[] = array("NAME" => Loc::getMessage("SOA_VAT"), "IS_PERCENT" => "Y", "VALUE" => $order->getVatRate() * 100, "VALUE_FORMATED" => "(" . $order->getVatRate() * 100 . "%, " . GetMessage("SOA_VAT_INCLUDED") . ")", "VALUE_MONEY" => $order->getVatSum(), "VALUE_MONEY_FORMATED" => SaleFormatCurrency($order->getVatSum(), $order->getCurrency()), "APPLY_ORDER" => 100, "IS_IN_PRICE" => "Y", "CODE" => "VAT");
}
return $this->availableList;
}
示例8: foreach
foreach ($vats as $vatRate => $vatSum) {
$arCells[++$n] = array(1 => null, null, null, null, null, sprintf("Impuesto (%s%%):", roundEx($vatRate * 100, SALE_VALUE_PRECISION)), SaleFormatCurrency($vatSum, $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false));
}
} else {
$dbTaxList = CSaleOrderTax::GetList(array("APPLY_ORDER" => "ASC"), array("ORDER_ID" => $ORDER_ID));
while ($arTaxList = $dbTaxList->Fetch()) {
$arCells[++$n] = array(1 => null, null, null, null, null, htmlspecialcharsbx(sprintf("%s%s%s:", $arTaxList["IS_IN_PRICE"] == "Y" ? "Incluido " : "", $arTaxList["TAX_NAME"], sprintf(' (%s%%)', roundEx($arTaxList["VALUE"], SALE_VALUE_PRECISION)))), SaleFormatCurrency($arTaxList["VALUE_MONEY"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false));
}
}
if (DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SUM_PAID"]) > 0) {
$arCells[++$n] = array(1 => null, null, null, null, null, "Pago hecho:", SaleFormatCurrency($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SUM_PAID"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false));
}
if (DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DISCOUNT_VALUE"]) > 0) {
$arCells[++$n] = array(1 => null, null, null, null, null, "Descuento:", SaleFormatCurrency($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DISCOUNT_VALUE"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false));
}
$arCells[++$n] = array(1 => null, null, null, null, null, "Total:", SaleFormatCurrency($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false));
}
?>
<table class="it" width="100%">
<tr>
<td><nobr>#</nobr></td>
<td><nobr>Artículo / Descripción</nobr></td>
<td><nobr>Cant</nobr></td>
<td><nobr>Unidades</nobr></td>
<td><nobr>Precio unitario</nobr></td>
<?php
if ($vat > 0) {
?>
<td><nobr>Tasa impositiva</nobr></td>
<?php
}
示例9: SaleFormatCurrency
">
Вы хотите оплатить через систему <b>www.kreditpilot.ru</b>.<br>
Cчет № <?php
echo $ORDER_ID . " от " . CSalePaySystemAction::GetParamValue("DATE_INSERT");
?>
<br>
<input type=hidden name=BillDescription value="Order <?php
echo $ORDER_ID;
?>
 ">
<input type=hidden name=BillSum value="<?php
echo CSalePaySystemAction::GetParamValue("SHOULD_PAY");
?>
">
Сумма к оплате по счету: <?php
echo SaleFormatCurrency(CSalePaySystemAction::GetParamValue("SHOULD_PAY"), CSalePaySystemAction::GetParamValue("CURRENCY"));
?>
<br>
<input type=hidden name=BillShopId value="<?php
echo CSalePaySystemAction::GetParamValue("SHOP_ID");
?>
">
<input type=hidden name=BillDate value="<?php
echo CSalePaySystemAction::GetParamValue("DATE_INSERT");
?>
">
<input type=hidden name=BillCurrency value="<?php
echo CSalePaySystemAction::GetParamValue("CURRENCY") == "RUR" ? "руб." : "";
?>
">
<br>
示例10: htmlspecialcharsBx
$basketName .= "<nobr><a href=\"" . $url . "\">";
$basket .= "<nobr><a href=\"" . $url . "\">";
}
$basket .= htmlspecialcharsBx($arB["NAME"]);
$basketName .= htmlspecialcharsBx($arB["NAME"]);
if (strlen($arB["DETAIL_PAGE_URL"]) > 0) {
$basketName .= "</a></nobr>";
$basket .= "</a></nobr>";
}
$measure = isset($arB["MEASURE_TEXT"]) ? $arB["MEASURE_TEXT"] : GetMessage("SB_SHT");
$basket .= " (" . $arB["QUANTITY"] . " " . $measure . ") - " . "<nobr>" . SaleFormatCurrency($arB["PRICE"], $arB["CURRENCY"]) . "</nobr><br>";
$dbProp = CSaleBasket::GetPropsList(array("SORT" => "ASC", "ID" => "ASC"), array("BASKET_ID" => $arB["ID"], "!CODE" => array("CATALOG.XML_ID", "PRODUCT.XML_ID")));
while ($arProp = $dbProp->GetNext()) {
$basket .= "<div><small>" . $arProp["NAME"] . ": " . $arProp["VALUE"] . "</small></div>";
}
$basketPrice .= "<nobr>" . SaleFormatCurrency($arB["PRICE"], $arB["CURRENCY"]) . "</nobr>";
$basketQuantity .= $arB["QUANTITY"];
if ($arB["SUBCRIBE"] == "Y") {
$basketAvaible .= GetMessage("SB_TYPE_SUB");
} elseif ($arB["DELAY"] == "Y") {
$basketAvaible .= GetMessage("SB_TYPE_DEL");
} elseif ($arB["CAN_BUY"] == "Y") {
$basketAvaible .= GetMessage("SB_TYPE_AV");
} else {
$basketAvaible .= GetMessage("SB_TYPE_NA");
}
}
$row->AddField("BASKET", $basket);
$row->AddField("BASKET_NAME", $basketName);
$row->AddField("BASKET_PRICE", $basketPrice);
$row->AddField("BASKET_QUANTITY", $basketQuantity);
示例11: bxModifySaleMails
//.........这里部分代码省略.........
if (!Add2BasketByProductID($item_price['PRODUCT_ID'], $item_price['QUANTITY'], array(
'ORDER_ID' => $ORDER_ID,
), $basket_props)) {
$rows['err'] = 'Ошибка добавления товара в заказ';
$fail = true;
}
/*$price_product+=$item_price['PRICE']*$item_price['QUANTITY'];
$products_descriptions.=$item_price['NAME']." - ".$item_price['QUANTITY']." шт: ".intval($item_price['PRICE'])." руб <br/>";
*/
$i++;
/**
* обновляем параметры нового заказа на актуальные
*/
if($size_of_productpartner==$i){
if (!$fail) {
$dbBasketItems = CSaleBasket::GetList(
array("NAME" => "ASC", "ID" => "ASC"), array(
"LID" => SITE_ID,
"ORDER_ID" => $ORDER_ID
), false, false, array(
"ID", "NAME", "QUANTITY", "CURRENCY", "CAN_BUY", "PRICE", "WEIGHT", "DISCOUNT_PRICE"
)
);
$summ = $weight = 0;
$strOrderList = "";
$arBasket = array();
while ($arBasketItems = $dbBasketItems->GetNext()) {
$strOrderList .= $arBasketItems["NAME"] . " - " . $arBasketItems["QUANTITY"] . " шт на " . SaleFormatCurrency($arBasketItems["PRICE"] * $arBasketItems["QUANTITY"], $arBasketItems["CURRENCY"]);
$strOrderList .= "\n";
$rows['summ']=$summ += roundEx($arBasketItems["PRICE"], SALE_VALUE_PRECISION) * DoubleVal($arBasketItems["QUANTITY"]);
$weight += doubleval($arBasketItems['WEIGHT']);
$arBasket[] = $arBasketItems;
}
$arOrderForDiscount = array(
'SITE_ID' => SITE_ID,
'USER_ID' => $arUser['ID'],
'ORDER_PRICE' => $summ,
'ORDER_WEIGHT' => $weight,
'BASKET_ITEMS' => $arBasket,
);
$arDiscountOptions = array();
$arDiscountErrors = array();
CSaleDiscount::DoProcessOrder($arOrderForDiscount, $arDiscountOptions, $arDiscountErrors);
if($_REQUEST['comment'])
$arOrderForDiscount['COMMENTS'] = $_REQUEST['comment'];
if($arProperties_partners['DOSTAVKA']['VALUE']){
$arOrderForDiscount["PRICE_DELIVERY"] = $arProperties_partners['DOSTAVKA']['VALUE'];
$arOrderForDiscount["DELIVERY_ID"] = 3;
$summ += intval($arProperties_partners['DOSTAVKA']['VALUE']);
$arOrderForDiscount['ORDER_PRICE']=$summ;
}
$arOrderForDiscount['PRICE_BEFORE'] = $summ;
$arOrderForDiscount['PRICE'] = $summ;
$arOrderForDiscount['WEIGHT'] = $arOrderForDiscount['ORDER_WEIGHT'];
/**
* обновляем заказ
*/
if (!CSaleOrder::Update($ORDER_ID, $arOrderForDiscount)) {
$rows['err'] = 'Ошибка расчета цены заказа.';
$fail = true;
示例12: getOrderInfoDetail
function getOrderInfoDetail($orderId)
{
if (!$orderId) {
return false;
}
if (!$GLOBALS["USER"]->IsAuthorized()) {
return false;
}
$arFilter["ID"] = $orderId;
$saleModulePermissions = $GLOBALS["APPLICATION"]->GetGroupRight("sale");
if ($saleModulePermissions == "D") {
$arFilter["USER_ID"] = IntVal($GLOBALS["USER"]->GetID());
} elseif ($saleModulePermissions != "W") {
$arFilter["STATUS_PERMS_GROUP_ID"] = $GLOBALS["USER"]->GetUserGroupArray();
$arFilter[">=STATUS_PERMS_PERM_VIEW"] = "Y";
}
$arOrder = array();
$dbOrder = CSaleOrder::GetList(array(), $arFilter);
$arOrder = $dbOrder->GetNext();
if (!$arOrder) {
return false;
}
$arOrder["STATUS"] = CSaleStatus::GetLangByID($arOrder["STATUS_ID"]);
$arOrder["STATUS_NAME"] = $arOrder["STATUS"]["NAME"];
$arOrder["PRICE_IN_ALL_NUM"] = floatval($arOrder["~PRICE"] + floatval($arOrder["~PRICE_DELIVERY"]));
$arOrder["PRICE_IN_ALL"] = SaleFormatCurrency($arOrder["PRICE_IN_ALL_NUM"], $arOrder["CURRENCY"]);
$arOrder["PRICE_STR"] = SaleFormatCurrency($arOrder["PRICE"], $arOrder["CURRENCY"]);
$arOrder["PERSON_TYPE"] = CSalePersonType::GetByID($arOrder["PERSON_TYPE_ID"]);
$arOrder["PERSON_TYPE_NAME"] = htmlspecialcharsbx($arOrder["PERSON_TYPE"]["NAME"]);
$arOrder = self::getOrderProps($arOrder);
$arOrder["DELIVERY_NAME"] = self::getDeliveriesInfo(array($arOrder["DELIVERY_ID"]));
$arOrder["DELIVERY_NAME"] = $arOrder["DELIVERY_NAME"][$arOrder["DELIVERY_ID"]];
$arPaySys = CSalePaySystem::GetByID($arOrder["PAY_SYSTEM_ID"], $arOrder["PERSON_TYPE_ID"]);
$arOrder["PAY_SYSTEM_NAME"] = $arPaySys["NAME"];
$dbUserAccount = CSaleUserAccount::GetList(array(), array("USER_ID" => $arOrder["USER_ID"], "CURRENCY" => $arOrder["CURRENCY"], "LOCKED" => "N"));
$arUserAccount = $dbUserAccount->GetNext();
$arOrder["CURRENT_BUDGET"] = $arUserAccount["CURRENT_BUDGET"] ? $arUserAccount["CURRENT_BUDGET"] : 0;
$arOrder["CURRENT_BUDGET_STRING"] = SaleFormatCurrency($arOrder["CURRENT_BUDGET"], $arOrder["CURRENCY"]);
return $arOrder;
}
示例13: elseif
}
}
?>
</td>
<?php
} elseif ($arColumn["id"] == "PRICE_FORMATED") {
?>
<td class="price right">
<div class="current_price"><?php
echo $arItem["PRICE_FORMATED"];
?>
</div>
<div class="old_price right">
<?php
if (doubleval($arItem["DISCOUNT_PRICE"]) > 0) {
echo SaleFormatCurrency($arItem["PRICE"] + $arItem["DISCOUNT_PRICE"], $arItem["CURRENCY"]);
$bUseDiscount = true;
}
?>
</div>
<?php
if ($bPriceType && strlen($arItem["NOTES"]) > 0) {
?>
<div style="text-align: left">
<div class="type_price"><?php
echo GetMessage("SALE_TYPE");
?>
</div>
<div class="type_price_value"><?php
echo $arItem["NOTES"];
示例14: number_format
</a>
</td>
<td>
<font face="Arial, Helvetica, sans-serif" color="#4f4f4f" size="3">' . $arItem["QUANTITY"] . '</font>
</td>
<td>
<font face="Arial, Helvetica, sans-serif" color="#4f4f4f" size="3">' . number_format($arItem["PRICE"], 0, ' ', ' ') . '</font>
<font face="Arial, Helvetica, sans-serif" color="#4f4f4f" size="2">' . GetMessage('SOA_CURRENCY_NS') . '</font>
</td>
</tr>';
}
$strOrderList .= '</table>';
$find = array('#SERVER_NAME#', '#SITE_TEMPLATE_PATH#');
$repl = array($_SERVER['SERVER_NAME'], SITE_TEMPLATE_PATH);
$social = str_replace($find, $repl, file_get_contents($_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . '/include_areas/newsletter_social.php'));
$arFields = array("ORDER_ID" => $arOrder["ACCOUNT_NUMBER"], "ORDER_DATE" => Date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT", SITE_ID))), "ORDER_USER" => strlen($arUserResult["PAYER_NAME"]) > 0 ? $arUserResult["PAYER_NAME"] : $USER->GetFormattedName(false), "PRICE" => SaleFormatCurrency($orderTotalSum, $arResult["BASE_LANG_CURRENCY"]), "BCC" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME), "EMAIL" => strlen($arUserResult["USER_EMAIL"]) > 0 ? $arUserResult["USER_EMAIL"] : $USER->GetEmail(), "ORDER_LIST" => $strOrderList, "SALE_EMAIL" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME), "DELIVERY_PRICE" => $arResult["DELIVERY_PRICE"], "SITE_TEMPLATE_PATH" => SITE_TEMPLATE_PATH, "SHOP_ADDRESS" => file_get_contents($_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . '/include_areas/address.php'), "SHOP_EMAIL" => file_get_contents($_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . '/include_areas/email.php'), "SHOP_SKYPE" => file_get_contents($_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . '/include_areas/skype.php'), "SHOP_PHONE" => file_get_contents($_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . '/include_areas/phone.php'), "SHOP_SOCIAL" => $social);
$eventName = "SALE_NEW_ORDER";
$bSend = true;
foreach (GetModuleEvents("sale", "OnOrderNewSendEmail", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array($arResult["ORDER_ID"], &$eventName, &$arFields)) === false) {
$bSend = false;
}
}
if ($bSend) {
$event = new CEvent();
$event->Send($eventName, SITE_ID, $arFields, "N");
}
CSaleMobileOrderPush::send("ORDER_CREATED", array("ORDER_ID" => $arFields["ORDER_ID"]));
}
if (empty($arResult["ERROR"])) {
if (CModule::IncludeModule("statistic")) {
示例15: array
} else {
$dbTaxList = CSaleOrderTax::GetList(array("APPLY_ORDER" => "ASC"), array("ORDER_ID" => $ORDER_ID));
while ($arTaxList = $dbTaxList->Fetch()) {
$arCells[++$n] = array(1 => null, null, null, null, null, CSalePdf::prepareToPdf(sprintf("%s%s%s:", $arTaxList["IS_IN_PRICE"] == "Y" ? "inkl." : "zzgl.", sprintf(' %s%% ', roundEx($arTaxList["VALUE"], SALE_VALUE_PRECISION)), $arTaxList["TAX_NAME"])), CSalePdf::prepareToPdf(SaleFormatCurrency($arTaxList["VALUE_MONEY"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false)));
$arRowsWidth[7] = max($arRowsWidth[7], $pdf->GetStringWidth($arCells[$n][7]));
}
}
if (DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SUM_PAID"]) > 0) {
$arCells[++$n] = array(1 => null, null, null, null, null, CSalePdf::prepareToPdf("Payment made:"), CSalePdf::prepareToPdf(SaleFormatCurrency($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SUM_PAID"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false)));
$arRowsWidth[7] = max($arRowsWidth[7], $pdf->GetStringWidth($arCells[$n][7]));
}
if (DoubleVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DISCOUNT_VALUE"]) > 0) {
$arCells[++$n] = array(1 => null, null, null, null, null, CSalePdf::prepareToPdf("Rabatt:"), CSalePdf::prepareToPdf(SaleFormatCurrency($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DISCOUNT_VALUE"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false)));
$arRowsWidth[7] = max($arRowsWidth[7], $pdf->GetStringWidth($arCells[$n][7]));
}
$arCells[++$n] = array(1 => null, null, null, null, null, CSalePdf::prepareToPdf("Gesamtbetrag:"), CSalePdf::prepareToPdf(SaleFormatCurrency($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false)));
$arRowsWidth[7] = max($arRowsWidth[7], $pdf->GetStringWidth($arCells[$n][7]));
for ($i = 1; $i <= 7; $i++) {
$arRowsWidth[$i] += 10;
}
if ($vat <= 0) {
$arRowsWidth[6] = 0;
}
$arRowsWidth[2] = $width - (array_sum($arRowsWidth) - $arRowsWidth[2]);
}
$pdf->Ln();
$x0 = $pdf->GetX();
$y0 = $pdf->GetY();
for ($i = 1; $i <= 7; $i++) {
if ($vat > 0 || $i != 6) {
$pdf->Cell($arRowsWidth[$i], 20, $arColsCaption[$i], 0, 0, 'C');