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[
'BILLLA_BACKGROUND'])
36 if (intval(
$path) > 0)
38 if ($arFile = CFile::GetFileArray(
$path))
39 $path = $arFile[
'SRC'];
42 $backgroundStyle =
$params[
'BILLLA_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[
'BILLLA_MARGIN_TOP'] ?: 15) * 72/25.4,
68 'right' => intval(
$params[
'BILLLA_MARGIN_RIGHT'] ?: 15) * 72/25.4,
69 'bottom' => intval(
$params[
'BILLLA_MARGIN_BOTTOM'] ?: 15) * 72/25.4,
70 'left' => intval(
$params[
'BILLLA_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[
"BILLLA_PATH_TO_LOGO"]) { ?>
84 <td
style=
"padding-right: 5pt; ">
85 <? $imgParams = CFile::_GetImgParams(
$params[
'BILLLA_PATH_TO_LOGO']);
86 $dpi = intval(
$params[
'BILLLA_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 foreach ($sellerAddress as
$i => $address)
107 $addrValue = implode(
'<br>', $sellerAddress)
108 ?><div
style=
"display: inline-block; vertical-align: top;"><b><?= $addrValue ?></b></div><?
116 unset($sellerAddress);
119 <?
if (
$params[
"SELLER_COMPANY_PHONE"]) { ?>
126<?
if(
$params[
'BILLLA_HEADER']):?>
134 <?
if (
$params[
"BUYER_PERSON_COMPANY_NAME"]) { ?>
136 <b><?=Loc::getMessage(
'SALE_HPS_BILLLA_FOR',
null,
$billLang)?></b><br>
138 if (
$params[
"BUYER_PERSON_COMPANY_ADDRESS"]) {
139 $buyerAddress =
$params[
"BUYER_PERSON_COMPANY_ADDRESS"];
140 if (is_array($buyerAddress))
142 if (!empty($buyerAddress))
144 foreach ($buyerAddress as
$i => $address)
149 $addrValue = implode(
'<br>', $buyerAddress)
150 ?><div
style=
"display: inline-block; vertical-align: top;"><?= $addrValue ?></div><?
158 unset($buyerAddress);
163 <?
if (
$params[
'BILLLA_PAYER_SHOW'] ===
'Y'):?>
170 <td><b><?=Loc::getMessage(
'SALE_HPS_BILLLA_DATE_INSERT',
null,
$billLang)?>:&
nbsp;</b></td>
173 <?
if (
$params[
"DATE_PAY_BEFORE"]) { ?>
175 <td><b><?=Loc::getMessage(
'SALE_HPS_BILLLA_DATE_PAY_BEFORE',
null,
$billLang)?>:&
nbsp;</b></td>
188<?
if (
$params[
'BILLLA_PAYER_SHOW'] ===
'Y' ||
$params[
"BUYER_PERSON_COMPANY_NAME"]):?>
198 if (
$params[
'BILLLA_COLUMN_'.$column.
'_SHOW'] ==
'Y')
202 'SORT' =>
$params[
'BILLLA_COLUMN_'.$column.
'_SORT']
213 'SORT' =>
$val[
'SORT']
218uasort(
$arCols,
function (
$a, $b) {
return (
$a[
'SORT'] < $b[
'SORT']) ? -1 : 1;});
233 foreach (
$params[
'BASKET_ITEMS'] as $basketItem)
236 if ($basketItem[
'IS_VAT_IN_PRICE'])
239 $vatLessPrice = $basketItem[
'PRICE'];
241 $productName = $basketItem[
"NAME"];
242 if ($productName ==
"OrderDelivery")
243 $productName = Loc::getMessage(
'SALE_HPS_BILLLA_DELIVERY',
null,
$billLang);
244 else if ($productName ==
"OrderDiscount")
245 $productName = Loc::getMessage(
'SALE_HPS_BILLLA_DISCOUNT',
null,
$billLang);
248 foreach (
$arCols as $columnId => $col)
276 $data = ($basketItem[$columnId]) ?:
'';
282 if ($basketItem[
'PROPS'])
286 foreach ($basketItem[
'PROPS'] as $basketPropertyItem)
288 if ($basketPropertyItem[
'CODE'] ==
'CATALOG.XML_ID' || $basketPropertyItem[
'CODE'] ==
'PRODUCT.XML_ID')
290 $arProps[
$n][] =
htmlspecialcharsbx(sprintf(
"%s: %s", $basketPropertyItem[
"NAME"], $basketPropertyItem[
"VALUE"]));
293 $sum += doubleval($vatLessPrice * $basketItem[
'QUANTITY']);
294 $vat = max(
$vat, $basketItem[
'VAT_RATE']);
295 if ($basketItem[
'VAT_RATE'] > 0)
297 $vatRate = (string)$basketItem[
'VAT_RATE'];
298 if (!isset($vats[$vatRate]))
301 if ($basketItem[
'IS_VAT_IN_PRICE'])
302 $vats[$vatRate] += ($basketItem[
'PRICE'] - $vatLessPrice) * $basketItem[
'QUANTITY'];
304 $vats[$vatRate] += ($basketItem[
'PRICE']*(1 + $basketItem[
'VAT_RATE']) - $vatLessPrice) * $basketItem[
'QUANTITY'];
317 if (
$params[
'DELIVERY_PRICE'] > 0)
319 $sDeliveryItem = Loc::getMessage(
'SALE_HPS_BILLLA_DELIVERY',
null,
$billLang);
321 $sDeliveryItem .= sprintf(
" (%s)",
$params[
'DELIVERY_NAME']);
323 foreach (
$arCols as $columnId => $col)
370 if (
$params[
'BILLLA_TOTAL_SHOW'] ==
'Y')
408 foreach ($vats as $vatRate => $vatSum)
422 foreach (
$params[
'TAXES'] as $tax)
430 ($tax[
"IS_IN_PRICE"] ==
"Y") ? Loc::getMessage(
'SALE_HPS_BILLLA_TAX_IN',
null,
$billLang) :
"",
469<table
class=
"it" width=
"100%">
471 <?
foreach (
$arCols as $columnId => $col):?>
472 <td><?=$col[
'NAME'];?></td>
484 <?
foreach (
$arCols as $columnId => $col):?>
488 if ($columnId ===
'NUMBER')
492 elseif ($columnId ===
'NAME')
495 <td
align=
"<?=($n > $items) ? 'right' : 'left';?>"
496 style=
"word-break: break-word; word-wrap: break-word; <? if ($accumulated) {?>border-width: 0pt 1pt 0pt 0pt; <? } ?>"
497 <?
if ($accumulated) { ?>colspan=
"<?=($accumulated+1); ?>"<? $accumulated = 0; } ?>>
500 <?
foreach (
$props[
$n] as $property) { ?>
502 <small><?=$property; ?></small>
514 <?
if ($accumulated) { ?>
515 style=
"border-width: 0pt 1pt 0pt 0pt"
516 colspan=
"<?=(($columnId == 'VAT_RATE' && $vat <= 0) ? $accumulated : $accumulated+1); ?>"
517 <? $accumulated = 0; } ?>>
518 <?
if ($columnId ==
'SUM' || $columnId ==
'PRICE'):?>
550<?
if (
$params[
"BILLLA_COMMENT1"] ||
$params[
"BILLLA_COMMENT2"]) { ?>
551<b><?=Loc::getMessage(
'SALE_HPS_BILLLA_COMMENT',
null,
$billLang)?></b>
553 <?
if (
$params[
"BILLLA_COMMENT1"]) { ?>
555 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
557 ),
'',
array(), 0)); ?>
561 <?
if (
$params[
"BILLLA_COMMENT2"]) { ?>
563 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
565 ),
'',
array(), 0)); ?>
579<table
class=
"sign" style=
"width: 100%; ">
581 <td
style=
"width: 50%; ">
585 <b><?=Loc::getMessage(
'SALE_HPS_BILLLA_COMPANY_BANK_DETAIL',
null,
$billLang)?></b>
588 <?
if (
$params[
"SELLER_COMPANY_NAME"]) { ?>
593 # <?=Loc::getMessage('SALE_HPS_BILLLA_COMPANY_BANK', null, $billLang)?>: <?=htmlspecialcharsbx($bankAccNo); ?>
597 <? $bankAddr =
$params[
"SELLER_COMPANY_BANK_ADDR"]; ?>
598 <? $bankPhone =
$params[
"SELLER_COMPANY_BANK_PHONE"]; ?>
600 <?
if (
$bank || $bankAddr || $bankPhone) { ?>
604 <?
if ($bankAddr) { ?>
609 <?
if ($bankPhone) { ?>
623 <td
style=
"width: 50%; ">
627 $params[
"BILLLA_PATH_TO_STAMP"],
629 'style="position: absolute; left: 30pt; "'
633 <table
style=
"width: 100%; position: relative; ">
638 <?
if (
$params[
"SELLER_COMPANY_DIRECTOR_POSITION"]) { ?>
639 <?
if (
$params[
"SELLER_COMPANY_DIRECTOR_NAME"] ||
$params[
"SELLER_COMPANY_DIR_SIGN"]) { ?>
640 <?
if (
$params[
"SELLER_COMPANY_DIRECTOR_NAME"]) { ?>
641 <tr><td>&
nbsp;</td></tr>
646 <tr><td>&
nbsp;</td></tr>
649 <td
style=
"border-bottom: 1pt solid #000000; text-align: center; ">
652 $params[
"SELLER_COMPANY_DIR_SIGN"],
654 'style="position: absolute; margin-left: -75pt; bottom: 0pt; "'
661 <?
if (
$params[
"SELLER_COMPANY_ACCOUNTANT_POSITION"]) { ?>
662 <?
if (
$params[
"SELLER_COMPANY_ACCOUNTANT_NAME"] ||
$params[
"SELLER_COMPANY_ACC_SIGN"]) { ?>
663 <?
if (
$params[
"SELLER_COMPANY_ACCOUNTANT_NAME"]) { ?>
664 <tr><td>&
nbsp;</td></tr>
669 <tr><td>&
nbsp;</td></tr>
672 <td
style=
"border-bottom: 1pt solid #000000; text-align: center; ">
675 $params[
"SELLER_COMPANY_ACC_SIGN"],
677 '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