2if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !==
true)
9<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
13<meta
http-equiv=
"Content-Type" content=
"text/html; charset=<?=LANG_CHARSET?>">
16 table.acc td { padding: 0pt; vertical-
align:
top; }
17 table.it td { border: 1pt solid #000000; padding: 0pt 3pt; }
18 table.sign td { font-weight: bold; vertical-
align: bottom; }
31if (
$params[
'BILLUA_BACKGROUND'])
34 if (intval(
$path) > 0)
36 if ($arFile = CFile::GetFileArray(
$path))
37 $path = $arFile[
'SRC'];
40 $backgroundStyle =
$params[
'BILLUA_BACKGROUND_STYLE'];
41 if (!in_array($backgroundStyle,
array(
'none',
'tile',
'stretch')))
42 $backgroundStyle =
'none';
46 switch ($backgroundStyle)
56 "url('%s') 0 0 repeat-y; background-size: %.02fpt %.02fpt",
65 'top' => intval(
$params[
'BILLUA_MARGIN_TOP'] ?: 15) * 72/25.4,
66 'right' => intval(
$params[
'BILLUA_MARGIN_RIGHT'] ?: 15) * 72/25.4,
67 'bottom' => intval(
$params[
'BILLUA_MARGIN_BOTTOM'] ?: 15) * 72/25.4,
68 'left' => intval(
$params[
'BILLUA_MARGIN_LEFT'] ?: 20) * 72/25.4
75<body
style=
"margin: 0pt; padding: 0pt;"<?
if (
$_REQUEST[
'PRINT'] ==
'Y') { ?> onload=
"setTimeout(window.print, 0);"<? } ?>>
77<div
style=
"margin: 0pt; padding: <?=join('pt ', $margin); ?>pt; width: <?=$width; ?>pt; background: <?=$background; ?>">
78<?
if (
$params[
'BILLUA_HEADER']):?>
91 <?
if (
$params[
'BILLUA_SELLER_SHOW'] ==
'Y'):?>
93 <td><?=Loc::getMessage(
'SALE_HPS_BILLUA_SELLER',
null,
$billLang)?>:</td>
94 <td
style=
"padding-left: 4pt; ">
112 <?
if(
$params[
"SELLER_COMPANY_PHONE"]):?>
118 foreach (
array(
'EDRPOY',
'IPN',
'PDV') as $value)
120 if (
$params[
"SELLER_COMPANY_".$value])
125 if (
$params[
"SELLER_COMPANY_SYS"]) { ?>
132 <tr><td>&
nbsp;</td><td>&
nbsp;</td></tr>
133 <?
if (
$params[
'BILLUA_PAYER_SHOW'] ===
'Y') :?>
135 <td><?=Loc::getMessage(
'SALE_HPS_BILLUA_BUYER',
null,
$billLang);?>:</td>
136 <td
style=
"padding-left: 4pt; ">
143 if (
$params[
"BUYER_PERSON_COMPANY_ADDRESS"])
145 $buyerAddr =
$params[
"BUYER_PERSON_COMPANY_ADDRESS"];
146 if (is_array($buyerAddr))
147 $buyerAddr = implode(
', ', $buyerAddr);
149 $buyerAddr = str_replace(
array(
"\r\n",
"\n",
"\r"),
', ', strval($buyerAddr));
160<?
if (
$params[
"BUYER_PERSON_COMPANY_DOGOVOR"]) { ?>
176 if (
$params[
'BILLUA_COLUMN_'.$column.
'_SHOW'] ==
'Y')
178 $caption =
$params[
'BILLUA_COLUMN_'.$column.
'_TITLE'];
180 if (in_array($column, [
'PRICE',
'SUM']))
182 $caption .=
', '.$currency;
187 'SORT' =>
$params[
'BILLUA_COLUMN_'.$column.
'_SORT']
198 'SORT' =>
$val[
'SORT']
203uasort(
$arCols,
function (
$a, $b) {
return (
$a[
'SORT'] < $b[
'SORT']) ? -1 : 1;});
212 $isVatInPrice =
false;
217 foreach (
$params[
'BASKET_ITEMS'] as $basketItem)
219 $productName = $basketItem[
"NAME"];
220 if ($productName ==
"OrderDelivery")
221 $productName = Loc::getMessage(
'SALE_HPS_BILLUA_DELIVERY',
null,
$billLang);
222 else if ($productName ==
"OrderDiscount")
223 $productName = Loc::getMessage(
'SALE_HPS_BILLUA_DISCOUNT',
null,
$billLang);
225 $isVatInPrice = $basketItem[
'IS_VAT_IN_PRICE'];
227 if ($basketItem[
'IS_VAT_IN_PRICE'])
228 $basketItemPrice = $basketItem[
'PRICE'];
230 $basketItemPrice = $basketItem[
'PRICE']*(1 + $basketItem[
'VAT_RATE']);
233 foreach (
$arCols as $columnId => $col)
261 $data = ($basketItem[$columnId]) ?:
'';
267 if ($basketItem[
'PROPS'])
271 foreach ($basketItem[
'PROPS'] as $basketPropertyItem)
273 if ($basketPropertyItem[
'CODE'] ==
'CATALOG.XML_ID' || $basketPropertyItem[
'CODE'] ==
'PRODUCT.XML_ID')
275 $arProps[
$n][] =
htmlspecialcharsbx(sprintf(
"%s: %s", $basketPropertyItem[
"NAME"], $basketPropertyItem[
"VALUE"]));
279 $sum += doubleval($basketItem[
'PRICE'] * $basketItem[
'QUANTITY']);
280 $vat = max(
$vat, $basketItem[
'VAT_RATE']);
283 if (
$vat <= 0 && array_key_exists(
'VAT_RATE',
$arCols))
292 if (
$vat > 0 && array_key_exists(
'PRICE',
$arCols) && $isVatInPrice)
298 if (
$params[
'DELIVERY_PRICE'] > 0)
300 $sDeliveryItem = Loc::getMessage(
'SALE_HPS_BILLUA_DELIVERY',
null,
$billLang);
302 $sDeliveryItem .= sprintf(
" (%s)",
$params[
'DELIVERY_NAME']);
304 foreach (
$arCols as $columnId => $col)
342 if (
$params[
'BILLUA_TOTAL_SHOW'] ==
'Y')
348 foreach (
$params[
'TAXES'] as $tax)
356 ($tax[
"IS_IN_PRICE"] ==
"Y") ? Loc::getMessage(
'SALE_HPS_BILLUA_IN_PRICE',
null,
$billLang) :
"",
357 (
$vat <= 0) ? $tax[
"TAX_NAME"] : Loc::getMessage(
'SALE_HPS_BILLUA_TAX',
null,
$billLang),
358 (
$vat <= 0 && $tax[
"IS_PERCENT"] ==
"Y")
364 $orderTax += $tax[
"VALUE_MONEY"];
400<table
class=
"it" width=
"100%">
402 <?
foreach (
$arCols as $columnId => $col):?>
403 <td><?=$col[
'NAME'];?></td>
415 <?
foreach (
$arCols as $columnId => $col):
418 if ($columnId ===
'NUMBER')
422 elseif ($columnId ===
'NAME')
425 <td
align=
"<?=($n > $items) ? 'right' : 'left';?>"
426 style=
"word-break: break-word; word-wrap: break-word; <? if ($accumulated) {?>border-width: 0pt 1pt 0pt 0pt; <? } ?>"
427 <?
if ($accumulated) { ?>colspan=
"<?=($accumulated+1); ?>"<? $accumulated = 0; } ?>>
430 <?
foreach (
$props[
$n] as $property) { ?>
432 <small><?=$property; ?></small>
444 <?
if ($accumulated) { ?>
445 style=
"border-width: 0pt 1pt 0pt 0pt"
446 colspan=
"<?=(($columnId == 'VAT_RATE' && $vat <= 0) ? $accumulated : $accumulated+1); ?>"
447 <? $accumulated = 0; } ?>>
448 <?
if ($columnId ==
'SUM' || $columnId ==
'PRICE'):?>
471<?
if (
$params[
'BILLUA_TOTAL_SHOW'] ==
'Y'): ?>
473 Loc::getMessage(
'SALE_HPS_BILLUA_BASKET_ITEMS_TOTAL',
null,
$billLang),
489 <?
if (
$vat > 0) { ?>
491 Loc::getMessage(
'SALE_HPS_BILLUA_BASKET_ITEMS_TAX',
null,
$billLang),
496 <? }
elseif($orderTax == 0) { ?>
497 <b><?=Loc::getMessage(
'SALE_HPS_BILLUA_BASKET_ITEMS_WITHOUT_TAX',
null,
$billLang);?></b>
502<?
if (
$params[
"BILLUA_COMMENT1"] ||
$params[
"BILLUA_COMMENT2"]) { ?>
503<b><?=Loc::getMessage(
'SALE_HPS_BILLUA_COMMENT',
null,
$billLang)?></b>
505 <?
if (
$params[
"BILLUA_COMMENT1"]) { ?>
507 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
509 ),
'',
array(), 0)); ?>
513 <?
if (
$params[
"BILLUA_COMMENT2"]) { ?>
515 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
517 ),
'',
array(), 0)); ?>
523<?
if (
$params[
'BILLUA_FOOTER_SHOW'] ==
'Y'):?>
524 <div
style=
"border-bottom: 1pt solid #000000; width:100%; ">&
nbsp;</div>
528 $params[
"BILLUA_PATH_TO_STAMP"],
530 'style="position: absolute; left: 40pt; "'
535 <div
style=
"position: relative">
538 <td><?=Loc::getMessage(
'SALE_HPS_BILLUA_WRITER',
null,
$billLang)?>:&
nbsp;</td>
539 <td
style=
"width: 160pt; border: 1pt solid #000000; border-width: 0pt 0pt 1pt 0pt; text-align: center; ">
544 <td
style=
"width: 160pt; ">
546 style=
"border: none; background: none; width: 100%; "
548 value=
"<?=htmlspecialcharsbx($params["SELLER_COMPANY_ACCOUNTANT_NAME
"]); ?>"
552 <?
if (
$params[
"SELLER_COMPANY_ACCOUNTANT_POSITION"]):?>
553 <td><?=Loc::getMessage(
'SALE_HPS_BILLUA_ACC_POSITION',
null,
$billLang)?>:&
nbsp;</td>
554 <td
style=
"width: 160pt; border: 1pt solid #000000; border-width: 0pt 0pt 1pt 0pt; ">
556 style=
"border: none; background: none; width: 100%; text-align: center; "
558 value=
"<?=htmlspecialcharsbx($params["SELLER_COMPANY_ACCOUNTANT_POSITION
"]); ?>"
570<?
if (
$params[
"DATE_PAY_BEFORE"]) { ?>
571<div
style=
"text-align: right; "><b><?=sprintf(
572 Loc::getMessage(
'SALE_HPS_BILLUA_DATE_PAID_BEFORE',
null,
$billLang),
static ShowImage($strImage, $iMaxW=0, $iMaxH=0, $sParams=null, $strImageUrl="", $bPopup=false, $sPopupTitle=false, $iSizeWHTTP=0, $iSizeHHTTP=0, $strImageUrlTemplate="")
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
bx_acc_lim_group_list limitGroupList[] multiple<?=$group[ 'ID']?> ID selected margin top
<? if( $useEditor3):?>< tr class="heading">< td colspan="2"><? echo GetMessage("FILEMAN_OPTION_SPELL_SET");?></td ></tr ><? if(function_exists( 'pspell_config_create')):$use_pspell_checked=(COption::GetOptionString( $module_id, "use_pspell", "Y")=="Y") ? "checked" :"";?>< tr >< td valign="top">< label for="use_pspell"><?echo GetMessage("FILEMAN_OPTION_USE_PSPELL");?></label >< br >< a title="<?echo GetMessage("FILEMAN_OPTION_ADDISH_DICS_TITLE");?> http
ConvertDateTime($datetime, $to_format=false, $from_site=false, $bSearchInSitesOnly=false)
htmlspecialcharsback($str)
HTMLToTxt($str, $strSiteUrl="", $aDelete=[], $maxlen=70)
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
global_menu_<?echo $menu["menu_id"]?> adm main menu item icon adm main menu item text text adm main menu hover adm submenu menucontainer menu_id menu_id items_id items_id desktop menu_id block none adm global submenu<?=($subMenuDisplay=="block" ? " adm-global-submenu-active" :"")?> global_submenu_<?echo $menu["menu_id"]?> text MAIN_PR_ADMIN_FAV items adm submenu items wrap adm submenu items stretch wrap BX adminMenu itemsStretchScroll()"> <table class if (!empty( $menu["items"])) elseif ( $menu[ 'menu_id']=='desktop') if ( $menu[ 'menu_id']=='desktop') endforeach
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
<? endif;?> window document title
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
if( $arBasket=$dbBasket->Fetch()) if($vat > 0) $rowsCnt
if(CSalePaySystemAction::GetParamValue('BACKGROUND', false)) $margin
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
SaleFormatCurrency($fSum, $strCurrency, $OnlyValue=false, $withoutFormat=false)
const SALE_VALUE_PRECISION
Number2Word_Rus($source, $IS_MONEY="Y", $currency="")