2if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !==
true)
10<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
14<meta
http-equiv=
"Content-Type" content=
"text/html; charset=<?=LANG_CHARSET?>">
17 table.it td { border: 1pt solid #000000; padding: 0pt 3pt; }
18 table.inv td, table.sign td { padding: 0pt; }
19 table.sign td { vertical-
align:
top; }
20 table.header td { padding: 0pt; vertical-
align:
top; }
33if (
$params[
'BILLBR_BACKGROUND'])
36 if (intval(
$path) > 0)
38 if ($arFile = CFile::GetFileArray(
$path))
39 $path = $arFile[
'SRC'];
42 $backgroundStyle =
$params[
'BILLBR_BACKGROUND_STYLE'];
43 if (!in_array($backgroundStyle,
array(
'none',
'tile',
'stretch')))
44 $backgroundStyle =
'none';
48 switch ($backgroundStyle)
58 "url('%s') 0 0 repeat-y; background-size: %.02fpt %.02fpt",
67 'top' => intval(
$params[
'BILLBR_MARGIN_TOP'] ?: 15) * 72/25.4,
68 'right' => intval(
$params[
'BILLBR_MARGIN_RIGHT'] ?: 15) * 72/25.4,
69 'bottom' => intval(
$params[
'BILLBR_MARGIN_BOTTOM'] ?: 15) * 72/25.4,
70 'left' => intval(
$params[
'BILLBR_MARGIN_LEFT'] ?: 20) * 72/25.4
77<body
style=
"margin: 0pt; padding: 0pt;"<?
if (
$_REQUEST[
'PRINT'] ==
'Y') { ?> onload=
"setTimeout(window.print, 0);"<? } ?>>
79<div
style=
"margin: 0pt; padding: <?=join('pt ', $margin); ?>pt; width: <?=$width; ?>pt; background: <?=$background; ?>">
83 <?
if (
$params[
"BILLBR_PATH_TO_LOGO"]) { ?>
84 <td
style=
"padding-right: 5pt; ">
85 <? $imgParams = CFile::_GetImgParams(
$params[
'BILLBR_PATH_TO_LOGO']);
86 $dpi = intval(
$params[
'BILLBR_LOGO_DPI']) ?: 96;
87 $imgWidth = $imgParams[
'WIDTH'] * 96 / $dpi;
91 <img src=
"<?=$imgParams['SRC']; ?>" width=
"<?=$imgWidth; ?>" />
96 if (
$params[
"SELLER_COMPANY_ADDRESS"]) {
97 $sellerAddress =
$params[
"SELLER_COMPANY_ADDRESS"];
98 if (is_array($sellerAddress))
100 if (!empty($sellerAddress))
102 $addrValue = implode(
"\n", $sellerAddress)
103 ?><div
style=
"display: inline-block; vertical-align: top;"><b><?= nl2br(
htmlspecialcharsbx($addrValue)) ?></b></div><?
111 unset($sellerAddress);
114 <?
if (
$params[
"SELLER_COMPANY_PHONE"]) { ?>
121<?
if(
$params[
'BILLBR_HEADER']):?>
129 <?
if (
$params[
"BUYER_PERSON_COMPANY_NAME"]) { ?>
131 <b><?=Loc::getMessage(
'SALE_HPS_BILLBR_FOR',
null,
$billLang)?></b><br>
133 if (
$params[
"BUYER_PERSON_COMPANY_ADDRESS"]) {
134 $buyerAddress =
$params[
"BUYER_PERSON_COMPANY_ADDRESS"];
135 if (is_array($buyerAddress))
137 if (!empty($buyerAddress))
139 $addrValue = implode(
"\n", $buyerAddress)
140 ?><div
style=
"display: inline-block; vertical-align: top;"><?= nl2br(
htmlspecialcharsbx($addrValue)) ?></div><?
148 unset($buyerAddress);
153 <?
if (
$params[
'BILLBR_PAYER_SHOW'] ===
'Y'):?>
160 <td><b><?=Loc::getMessage(
'SALE_HPS_BILLBR_DATE_INSERT',
null,
$billLang)?>:&
nbsp;</b></td>
163 <?
if (
$params[
"DATE_PAY_BEFORE"]) { ?>
165 <td><b><?=Loc::getMessage(
'SALE_HPS_BILLBR_DATE_PAY_BEFORE',
null,
$billLang)?>:&
nbsp;</b></td>
178<?
if (
$params[
'BILLBR_PAYER_SHOW'] ===
'Y' ||
$params[
"BUYER_PERSON_COMPANY_NAME"]):?>
188 if (
$params[
'BILLBR_COLUMN_'.$column.
'_SHOW'] ==
'Y')
192 'SORT' =>
$params[
'BILLBR_COLUMN_'.$column.
'_SORT']
203 'SORT' =>
$val[
'SORT']
208uasort(
$arCols,
function (
$a, $b) {
return (
$a[
'SORT'] < $b[
'SORT']) ? -1 : 1;});
223 foreach (
$params[
'BASKET_ITEMS'] as $basketItem)
226 if ($basketItem[
'IS_VAT_IN_PRICE'])
229 $vatLessPrice = $basketItem[
'PRICE'];
231 $productName = $basketItem[
"NAME"];
232 if ($productName ==
"OrderDelivery")
233 $productName = Loc::getMessage(
'SALE_HPS_BILLBR_DELIVERY',
null,
$billLang);
234 else if ($productName ==
"OrderDiscount")
235 $productName = Loc::getMessage(
'SALE_HPS_BILLBR_DISCOUNT',
null,
$billLang);
238 foreach (
$arCols as $columnId => $col)
266 $data = ($basketItem[$columnId]) ?:
'';
272 if ($basketItem[
'PROPS'])
276 foreach ($basketItem[
'PROPS'] as $basketPropertyItem)
278 if ($basketPropertyItem[
'CODE'] ==
'CATALOG.XML_ID' || $basketPropertyItem[
'CODE'] ==
'PRODUCT.XML_ID')
280 $arProps[
$n][] =
htmlspecialcharsbx(sprintf(
"%s: %s", $basketPropertyItem[
"NAME"], $basketPropertyItem[
"VALUE"]));
283 $sum += doubleval($vatLessPrice * $basketItem[
'QUANTITY']);
284 $vat = max(
$vat, $basketItem[
'VAT_RATE']);
285 if ($basketItem[
'VAT_RATE'] > 0)
287 $vatRate = (string)$basketItem[
'VAT_RATE'];
288 if (!isset($vats[$vatRate]))
291 if ($basketItem[
'IS_VAT_IN_PRICE'])
292 $vats[$vatRate] += ($basketItem[
'PRICE'] - $vatLessPrice) * $basketItem[
'QUANTITY'];
294 $vats[$vatRate] += ($basketItem[
'PRICE']*(1 + $basketItem[
'VAT_RATE']) - $vatLessPrice) * $basketItem[
'QUANTITY'];
307 if (
$params[
'DELIVERY_PRICE'] > 0)
309 $sDeliveryItem = Loc::getMessage(
'SALE_HPS_BILLBR_DELIVERY',
null,
$billLang);
311 $sDeliveryItem .= sprintf(
" (%s)",
$params[
'DELIVERY_NAME']);
313 foreach (
$arCols as $columnId => $col)
360 if (
$params[
'BILLBR_TOTAL_SHOW'] ==
'Y')
398 foreach ($vats as $vatRate => $vatSum)
412 foreach (
$params[
'TAXES'] as $tax)
420 ($tax[
"IS_IN_PRICE"] ==
"Y") ? Loc::getMessage(
'SALE_HPS_BILLBR_TAX_IN',
null,
$billLang) :
"",
459<table
class=
"it" width=
"100%">
461 <?
foreach (
$arCols as $columnId => $col):?>
462 <td><?=$col[
'NAME'];?></td>
474 <?
foreach (
$arCols as $columnId => $col):?>
478 if ($columnId ===
'NUMBER')
482 elseif ($columnId ===
'NAME')
485 <td
align=
"<?=($n > $items) ? 'right' : 'left';?>"
486 style=
"word-break: break-word; word-wrap: break-word; <? if ($accumulated) {?>border-width: 0pt 1pt 0pt 0pt; <? } ?>"
487 <?
if ($accumulated) { ?>colspan=
"<?=($accumulated+1); ?>"<? $accumulated = 0; } ?>>
490 <?
foreach (
$props[
$n] as $property) { ?>
492 <small><?=$property; ?></small>
504 <?
if ($accumulated) { ?>
505 style=
"border-width: 0pt 1pt 0pt 0pt"
506 colspan=
"<?=(($columnId == 'VAT_RATE' && $vat <= 0) ? $accumulated : $accumulated+1); ?>"
507 <? $accumulated = 0; } ?>>
508 <?
if ($columnId ==
'SUM' || $columnId ==
'PRICE'):?>
540<?
if (
$params[
"BILLBR_COMMENT1"] ||
$params[
"BILLBR_COMMENT2"]) { ?>
541<b><?=Loc::getMessage(
'SALE_HPS_BILLBR_COMMENT',
null,
$billLang)?></b>
543 <?
if (
$params[
"BILLBR_COMMENT1"]) { ?>
545 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
547 ),
'',
array(), 0)); ?>
551 <?
if (
$params[
"BILLBR_COMMENT2"]) { ?>
553 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
555 ),
'',
array(), 0)); ?>
569<table
class=
"sign" style=
"width: 100%; ">
571 <td
style=
"width: 50%; ">
575 <b><?=Loc::getMessage(
'SALE_HPS_BILLBR_COMPANY_BANK_DETAIL',
null,
$billLang)?></b>
578 <?
if (
$params[
"SELLER_COMPANY_NAME"]) { ?>
587 <? $bankAddr =
$params[
"SELLER_COMPANY_BANK_ADDR"]; ?>
588 <? $bankPhone =
$params[
"SELLER_COMPANY_BANK_PHONE"]; ?>
590 <?
if (
$bank || $bankAddr || $bankPhone) { ?>
594 <?
if ($bankAddr) { ?>
599 <?
if ($bankPhone) { ?>
613 <td
style=
"width: 50%; ">
617 $params[
"BILLBR_PATH_TO_STAMP"],
619 'style="position: absolute; left: 30pt; "'
623 <table
style=
"width: 100%; position: relative; ">
628 <?
if (
$params[
"SELLER_COMPANY_DIRECTOR_POSITION"]) { ?>
629 <?
if (
$params[
"SELLER_COMPANY_DIRECTOR_NAME"] ||
$params[
"SELLER_COMPANY_DIR_SIGN"]) { ?>
630 <?
if (
$params[
"SELLER_COMPANY_DIRECTOR_NAME"]) { ?>
631 <tr><td>&
nbsp;</td></tr>
636 <tr><td>&
nbsp;</td></tr>
639 <td
style=
"border-bottom: 1pt solid #000000; text-align: center; ">
642 $params[
"SELLER_COMPANY_DIR_SIGN"],
644 'style="position: absolute; margin-left: -75pt; bottom: 0pt; "'
651 <?
if (
$params[
"SELLER_COMPANY_ACCOUNTANT_POSITION"]) { ?>
652 <?
if (
$params[
"SELLER_COMPANY_ACCOUNTANT_NAME"] ||
$params[
"SELLER_COMPANY_ACC_SIGN"]) { ?>
653 <?
if (
$params[
"SELLER_COMPANY_ACCOUNTANT_NAME"]) { ?>
654 <tr><td>&
nbsp;</td></tr>
659 <tr><td>&
nbsp;</td></tr>
662 <td
style=
"border-bottom: 1pt solid #000000; text-align: center; ">
665 $params[
"SELLER_COMPANY_ACC_SIGN"],
667 'style="position: absolute; margin-left: -75pt; bottom: 0pt; "'
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(!empty($sellerData)) $bankAccNo
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