2if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !==
true)
7Loc::loadMessages(__FILE__);
9<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
12<
title><?=Loc::getMessage(
'SALE_HPS_BILLKZ_TITLE')?></
title>
13<meta
http-equiv=
"Content-Type" content=
"text/html; charset=<?=LANG_CHARSET?>">
14<
style type=
"text/css">
16 table.acc td { border: 1pt solid #000000; padding: 0 3pt; line-
height: 16pt; }
17 table.acc tr.ntb td { border-
top-
style: none; }
18 table.acc tr.nbb td { border-bottom-
style: none; }
19 table.selbuy td { border: 0 none transparent; padding: 0 3pt; line-
height: 16pt; vertical-
align:
top;}
20 table.it td { border: 1pt solid #000000; padding: 0 3pt; }
21 table.sign td { vertical-
align: bottom;
height: 50px;}
22 table.header td { padding: 0; vertical-
align:
top; }
35if (
$params[
'BILLKZ_BACKGROUND'])
38 if (intval(
$path) > 0)
40 if ($arFile = CFile::GetFileArray(
$path))
41 $path = $arFile[
'SRC'];
44 $backgroundStyle =
$params[
'BILLKZ_BACKGROUND_STYLE'];
45 if (!in_array($backgroundStyle,
array(
'none',
'tile',
'stretch')))
46 $backgroundStyle =
'none';
50 switch ($backgroundStyle)
60 "url('%s') 0 0 repeat-y; background-size: %.02fpt %.02fpt",
69 'top' => intval(
$params[
'BILLKZ_MARGIN_TOP'] ?: 15) * 72/25.4,
70 'right' => intval(
$params[
'BILLKZ_MARGIN_RIGHT'] ?: 15) * 72/25.4,
71 'bottom' => intval(
$params[
'BILLKZ_MARGIN_BOTTOM'] ?: 15) * 72/25.4,
72 'left' => intval(
$params[
'BILLKZ_MARGIN_LEFT'] ?: 20) * 72/25.4
79<body
style=
"margin: 0pt; padding: 0pt; background: <?=$background; ?>"<?
if (
$_REQUEST[
'PRINT'] ==
'Y') { ?> onload=
"setTimeout(window.print, 0);"<? } ?>>
81<div
style=
"margin: 0pt; padding: <?=join('pt ', $margin); ?>pt; width: <?=$width; ?>pt; background: <?=$background; ?>">
83<?
if (
$params[
'BILLKZ_HEADER_SHOW'] ==
'Y'):?>
84 <?
if (
$params[
"BILLKZ_PATH_TO_LOGO"] ||
$params[
"BILLKZ_COMMENT1"] ||
$params[
"BILLKZ_COMMENT2"]) { ?>
85 <table
class=
"header" style=
"margin-bottom: 10pt; width: 100%">
87 <td
style=
"min-width: 80pt; padding-right: 5pt; padding-bottom: 5pt; ">
88 <?
if (
$params[
"BILLKZ_PATH_TO_LOGO"]) { ?>
90 $dpi = intval(
$params[
'BILLKZ_LOGO_DPI']) ?: 96;
91 $imgWidth = $imgParams[
'WIDTH'] * 96 / $dpi;
95 <img src=
"<?=$imgParams['SRC']; ?>" width=
"<?=$imgWidth; ?>" />
98 <?
if (
$params[
"BILLKZ_COMMENT1"] ||
$params[
"BILLKZ_COMMENT2"]) { ?>
99 <td
style=
"width: 10pt;"></td>
100 <td
style=
"text-align: center; vertical-align: middle;">
101 <?
if (
$params[
"BILLKZ_COMMENT1"]) { ?>
103 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
105 ),
'',
array(), 0)); ?>
106 <?
if (
$params[
"BILLKZ_COMMENT2"]) { ?>
110 <?
if (
$params[
"BILLKZ_COMMENT2"]) { ?>
112 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
114 ),
'',
array(), 0)); ?>
123 if (
$params[
"SELLER_COMPANY_BANK_NAME"])
125 $sellerBankCity =
'';
126 if (
$params[
"SELLER_COMPANY_BANK_CITY"])
128 $sellerBankCity =
$params[
"SELLER_COMPANY_BANK_CITY"];
129 if (is_array($sellerBankCity))
130 $sellerBankCity = implode(
', ', $sellerBankCity);
132 $sellerBankCity = str_replace(
array(
"\r\n",
"\n",
"\r"),
', ', strval($sellerBankCity));
136 $params[
"SELLER_COMPANY_BANK_NAME"],
143 $rsPattern =
'/\s*\d{10,100}\s*/';
152 <table
class=
"acc" width=
"100%">
160 <td><b><nobr><?= Loc::getMessage(
'SALE_HPS_BILLKZ_BENEFICIARY') ?>:</nobr></b></td>
161 <td colspan=
"2" style=
"text-align: center;"><b><nobr><?= Loc::getMessage(
'SALE_HPS_BILLKZ_IIK') ?></nobr></b></td>
162 <td
style=
"text-align: center;"><b><nobr><?= Loc::getMessage(
'SALE_HPS_BILLKZ_KBE') ?></nobr></b></td>
171 <td colspan=
"2">&
nbsp;</td>
175 <td><nobr><?= Loc::getMessage(
'SALE_HPS_BILLKZ_BENEFICIARY_BANK') ?>:</nobr></td>
176 <td
style=
"text-align: center;"><b><nobr><?= Loc::getMessage(
'SALE_HPS_BILLKZ_SELLER_BANK_BIK') ?></nobr></b></td>
177 <td colspan=
"2" style=
"text-align: center;"><b><nobr><?= Loc::getMessage(
'SALE_HPS_BILLKZ_PAYMENT_PC') ?></nobr></b></td>
184 <? if (
$params[
"BILLKZ_ORDER_SUBJECT"]): ?>
186 <td colspan=
"4"><?= Loc::getMessage(
'SALE_HPS_BILLKZ_PAYMENT_PURPOSE') ?>:</td>
203<?
if (
$params[
'BILLKZ_HEADER']):?>
205 $dateValue =
$params[
"PAYMENT_DATE_INSERT"];
206 if ($dateValue instanceof \
Bitrix\Main\Type\Date || $dateValue instanceof \
Bitrix\Main\Type\DateTime)
208 $dateValue = mb_strtolower(
FormatDate(
'd F Y', $dateValue->getTimestamp()));
209 $yearPostfix = Loc::getMessage(
'SALE_HPS_BILLKZ_YEAR_POSTFIX');
210 if (!empty($yearPostfix))
211 $dateValue .= $yearPostfix;
214 else if (is_string($dateValue))
217 if ($timeStampValue !==
false)
218 $dateValue = mb_strtolower(
FormatDate(
'd F Y', $timeStampValue));
219 unset($timeStampValue);
223 <td
style=
"font-size: 1.6em; font-weight: bold;">
229<table
width=
"100%" style=
"margin: 16pt 0;"><tr
style=
"border-bottom: 2pt solid #000000;"><td
style=
"padding: 0;"></td></tr></table>
232if (
$params[
"SELLER_COMPANY_BIN"] ||
$params[
"SELLER_COMPANY_IIN"])
234 $sellerInfo .= Loc::getMessage(
'SALE_HPS_BILLKZ_BIN').
' / '.Loc::getMessage(
'SALE_HPS_BILLKZ_IIN').
' ';
235 if (
$params[
"SELLER_COMPANY_BIN"])
236 $sellerInfo .=
$params[
"SELLER_COMPANY_BIN"];
237 else if (
$params[
"SELLER_COMPANY_IIN"])
238 $sellerInfo .=
$params[
"SELLER_COMPANY_IIN"];
240if (
$params[
"SELLER_COMPANY_NAME"])
242 if (!empty($sellerInfo))
244 $sellerInfo .=
$params[
"SELLER_COMPANY_NAME"];
246if (
$params[
"SELLER_COMPANY_ADDRESS"])
248 $buyerAddr =
$params[
"SELLER_COMPANY_ADDRESS"];
249 if (is_array($buyerAddr))
250 $buyerAddr = implode(
', ', $buyerAddr);
252 $buyerAddr = str_replace(
array(
"\r\n",
"\n",
"\r"),
', ', strval($buyerAddr));
253 if (!empty($sellerInfo))
255 $sellerInfo .= $buyerAddr;
257if (
$params[
"SELLER_COMPANY_PHONE"])
259 if (!empty($sellerInfo))
261 $sellerInfo .=
$params[
"SELLER_COMPANY_PHONE"];
263if (!empty($sellerInfo))
264 $sellerTitle = Loc::getMessage(
'SALE_HPS_BILLKZ_SELLER_NAME').
':';
267if (
$params[
'BILLKZ_PAYER_SHOW'] ==
'Y')
269 if (
$params[
"BUYER_PERSON_COMPANY_BIN"] ||
$params[
"BUYER_PERSON_COMPANY_IIN"])
271 $buyerInfo .= Loc::getMessage(
'SALE_HPS_BILLKZ_BIN').
' / '.Loc::getMessage(
'SALE_HPS_BILLKZ_IIN').
' ';
272 if (
$params[
"BUYER_PERSON_COMPANY_BIN"])
273 $buyerInfo .=
$params[
"BUYER_PERSON_COMPANY_BIN"];
274 else if (
$params[
"BUYER_PERSON_COMPANY_IIN"])
275 $buyerInfo .=
$params[
"BUYER_PERSON_COMPANY_IIN"];
277 if (
$params[
"BUYER_PERSON_COMPANY_NAME"])
279 if (!empty($buyerInfo))
281 $buyerInfo .=
$params[
"BUYER_PERSON_COMPANY_NAME"];
283 if (
$params[
"BUYER_PERSON_COMPANY_ADDRESS"])
285 $buyerAddr =
$params[
"BUYER_PERSON_COMPANY_ADDRESS"];
286 if (is_array($buyerAddr))
287 $buyerAddr = implode(
', ', $buyerAddr);
289 $buyerAddr = str_replace(
array(
"\r\n",
"\n",
"\r"),
', ', strval($buyerAddr));
290 if (!empty($buyerInfo))
292 $buyerInfo .= $buyerAddr;
294 if (
$params[
"BUYER_PERSON_COMPANY_PHONE"])
296 if (!empty($buyerInfo))
298 $buyerInfo .=
$params[
"BUYER_PERSON_COMPANY_PHONE"];
300 if (
$params[
"BUYER_PERSON_COMPANY_FAX"])
302 if (!empty($buyerInfo))
304 $buyerInfo .=
$params[
"BUYER_PERSON_COMPANY_FAX"];
306 if (
$params[
"BUYER_PERSON_COMPANY_NAME_CONTACT"])
308 if (!empty($buyerInfo))
310 $buyerInfo .=
$params[
"BUYER_PERSON_COMPANY_NAME_CONTACT"];
312 if (!empty($buyerInfo))
313 $buyerTitle = Loc::getMessage(
'SALE_HPS_BILLKZ_BUYER_NAME').
':';
316<table
class=
"selbuy" width=
"100%">
325<? if (
$params[
'BILLKZ_PAYER_SHOW'] ==
'Y'): ?>
326 <tr><td colspan=
"2" style=
"padding: 0; line-height: 7pt;">&
nbsp;</td></tr>
332<?
if (
$params[
'BUYER_PERSON_COMPANY_DOGOVOR']): ?>
333 <tr><td colspan=
"2" style=
"padding: 0; line-height: 7pt;">&
nbsp;</td></tr>
335 <td><?= Loc::getMessage(
'SALE_HPS_BILLKZ_BUYER_DOGOVOR') ?>:</td>
354 if (
$params[
'BILLKZ_COLUMN_'.$column.
'_SHOW'] ==
'Y')
358 'SORT' =>
$params[
'BILLKZ_COLUMN_'.$column.
'_SORT']
369 'SORT' =>
$val[
'SORT']
374uasort(
$arCols,
function (
$a, $b) {
return (
$a[
'SORT'] < $b[
'SORT']) ? -1 : 1;});
379foreach (
$params[
'BASKET_ITEMS'] as $basketItem)
381 $productName = $basketItem[
"NAME"];
382 if ($productName ==
"OrderDelivery")
383 $productName = Loc::getMessage(
'SALE_HPS_BILLKZ_DELIVERY');
384 else if ($productName ==
"OrderDiscount")
385 $productName = Loc::getMessage(
'SALE_HPS_BILLKZ_DISCOUNT');
387 if ($basketItem[
'IS_VAT_IN_PRICE'])
388 $basketItemPrice = $basketItem[
'PRICE'];
390 $basketItemPrice = $basketItem[
'PRICE']*(1 + $basketItem[
'VAT_RATE']);
393 foreach (
$arCols as $columnId => $caption)
409 $data = $basketItem[
"MEASURE_NAME"] ?
htmlspecialcharsbx($basketItem[
"MEASURE_NAME"]) : Loc::getMessage(
'SALE_HPS_BILLKZ_BASKET_MEASURE_DEFAULT');
421 $data = ($basketItem[$columnId]) ?:
'';
427 if ($basketItem[
'PROPS'])
429 foreach ($basketItem[
'PROPS'] as $basketPropertyItem)
431 if ($basketPropertyItem[
'CODE'] ==
'CATALOG.XML_ID' || $basketPropertyItem[
'CODE'] ==
'PRODUCT.XML_ID')
436 $sum += doubleval($basketItem[
'PRICE'] * $basketItem[
'QUANTITY']);
437 $vat = max(
$vat, $basketItem[
'VAT_RATE']);
451 $deliveryItem = Loc::getMessage(
'SALE_HPS_BILLKZ_DELIVERY');
454 $deliveryItem .= sprintf(
" (%s)",
$params[
'DELIVERY_NAME']);
456 foreach (
$arCols as $columnId => $caption)
490if (
$params[
'BILLKZ_TOTAL_SHOW'] ==
'Y')
506 foreach (
$params[
'TAXES'] as $tax)
514 ($tax[
"IS_IN_PRICE"] ==
"Y") ? Loc::getMessage(
'SALE_HPS_BILLKZ_INCLUDING') :
"",
516 (
$vat <= 0 && $tax[
"IS_PERCENT"] ==
"Y")
542 if (
$params[
'DISCOUNT_PRICE'] > 0)
560<table
class=
"it" width=
"100%">
562 <?
foreach (
$arCols as $columnId => $col):?>
563 <td><?=$col[
'NAME'];?></td>
574 <?
foreach (
$arCols as $columnId => $col):?>
576 if (!is_null(
$cells[
$n][$columnId]))
578 if ($columnId ===
'NUMBER')
582 elseif ($columnId ===
'NAME')
585 <td
align=
"<?=($n > $cntBasketItem) ? 'right' : 'left';?>"
586 style=
"word-break: break-word; word-wrap: break-word; <? if ($accumulated) {?>border-width: 0pt 1pt 0pt 0pt; <? } ?>"
587 <?
if ($accumulated) { ?>colspan=
"<?=($accumulated+1); ?>"<? $accumulated = 0; } ?>>
590 <?
foreach (
$props[
$n] as $property) { ?>
592 <small><?=$property; ?></small>
599 if (!is_null(
$cells[
$n][$columnId]))
604 <?
if ($accumulated) { ?>
605 style=
"border-width: 0pt 1pt 0pt 0pt"
606 colspan=
"<?=(($columnId == 'VAT_RATE' && $vat <= 0) ? $accumulated : $accumulated+1); ?>"
607 <? $accumulated = 0; } ?>>
608 <?
if ($columnId ==
'SUM' || $columnId ==
'PRICE'):?>
609 <nobr><?=
$cells[
$n][$columnId];?></nobr>
634<?
if (
$params[
'BILLKZ_TOTAL_SHOW'] ==
'Y'):?>
636 'SALE_HPS_BILLKZ_BASKET_TOTAL',
647 if (in_array(
$params[
'CURRENCY'],
array(
"RUR",
"RUB",
"UAH",
"KZT",
"BYR",
"BYN")))
663<table
width=
"100%" style=
"margin: 16pt 0;"><tr
style=
"border-bottom: 2pt solid #000000;"><td
style=
"padding: 0;"></td></tr></table>
664<?
if (
$params[
'BILLKZ_SIGN_SHOW'] ==
'Y'):?>
668 if (
$params[
'SELLER_COMPANY_ACCOUNTANT_NAME'])
670 if (
$params[
'SELLER_COMPANY_ACCOUNTANT_POSITION'])
671 $executorInfo .=
$params[
'SELLER_COMPANY_ACCOUNTANT_POSITION'];
672 if (!empty($executorInfo))
673 $executorInfo .=
' ';
674 $executorInfo .=
$params[
'SELLER_COMPANY_ACCOUNTANT_NAME'];
677 else if (
$params[
'SELLER_COMPANY_DIRECTOR_NAME'])
679 if (
$params[
'SELLER_COMPANY_DIRECTOR_POSITION'])
680 $executorInfo .=
$params[
'SELLER_COMPANY_DIRECTOR_POSITION'];
681 if (!empty($executorInfo))
682 $executorInfo .=
' ';
683 $executorInfo .=
$params[
'SELLER_COMPANY_DIRECTOR_NAME'];
686 else if (
$params[
'SELLER_COMPANY_ACCOUNTANT_POSITION'])
688 $executorInfo .=
$params[
'SELLER_COMPANY_ACCOUNTANT_POSITION'];
691 else if (
$params[
'SELLER_COMPANY_DIRECTOR_POSITION'])
693 $executorInfo .=
$params[
'SELLER_COMPANY_DIRECTOR_POSITION'];
698 $executorInfo = str_pad(
'', 6 * 35,
' ');
702 <div
style=
"position: relative; "><?
706 <div
style=
"position: relative">
707 <table
class=
"sign" style=
"width: 100%; margin-top: 50pt;">
714 <td
style=
"white-space: nowrap;"><b><?= Loc::getMessage(
"SALE_HPS_BILLKZ_EXECUTOR") ?></b></td>
715 <td
style=
"border-bottom: 1pt solid #000000; text-align: center;">
718 <td
style=
"white-space: nowrap; padding-left: 8pt;">
719 <?= !empty($executorInfo) ?
' / '.htmlspecialcharsbx($executorInfo).
' / ' :
' ' ?>
static ShowImage($strImage, $iMaxW=0, $iMaxH=0, $sParams=null, $strImageUrl="", $bPopup=false, $sPopupTitle=false, $iSizeWHTTP=0, $iSizeHHTTP=0, $strImageUrlTemplate="")
static _GetImgParams($strImage, $iSizeWHTTP=0, $iSizeHHTTP=0)
hidden PROPERTY[<?=$propertyIndex?>][CODE]<?=htmlspecialcharsEx( $propertyCode)?> height
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
FormatDate($format="", $timestamp=false, $now=false, ?string $languageId=null)
htmlspecialcharsback($str)
HTMLToTxt($str, $strSiteUrl="", $aDelete=[], $maxlen=70)
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
MakeTimeStamp($datetime, $format=false)
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']
if($params['BILLKZ_SIGN_SHOW']=='Y') $signParamName
SaleFormatCurrency($fSum, $strCurrency, $OnlyValue=false, $withoutFormat=false)
const SALE_VALUE_PRECISION
Number2Word_Rus($source, $IS_MONEY="Y", $currency="")