1<?
if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !==
true)
die();?><?
4if (!is_array($arOrder))
26$pdf->AddFont(
'Font',
'',
'pt_sans-regular.ttf',
true);
27$pdf->AddFont(
'Font',
'B',
'pt_sans-bold.ttf',
true);
41$pdf->SetDisplayMode(100,
'continuous');
51 "Рахунок на оплату №%s від %s",
52 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"ACCOUNT_NUMBER"],
69 'Р/р %s, Банк %s, МФО %s',
77 'Юридична адреса: %s, тел.: %s',
84 'ЄДРПОУ: %s, ІПН: %s, № свід. ПДВ: %s',
149 array(
"DATE_INSERT" =>
"ASC",
"NAME" =>
"ASC"),
152 array(
"ID",
"PRICE",
"CURRENCY",
"QUANTITY",
"NAME",
"VAT_RATE",
"MEASURE_NAME")
166 $arProdProps =
array();
168 array(
"SORT" =>
"ASC",
"ID" =>
"DESC"),
170 "BASKET_ID" => $arBasket[
"ID"],
171 "!CODE" =>
array(
"CATALOG.XML_ID",
"PRODUCT.XML_ID")
175 array(
"ID",
"BASKET_ID",
"NAME",
"VALUE",
"CODE",
"SORT")
177 while ($arBasketProps = $dbBasketProps->GetNext())
179 if (!empty($arBasketProps) && $arBasketProps[
"VALUE"] !=
"")
180 $arProdProps[] = $arBasketProps;
182 $arBasket[
"PROPS"] = $arProdProps;
184 $productName = $arBasket[
"NAME"];
185 if ($productName ==
"OrderDelivery")
186 $productName =
"Доставка";
187 else if ($productName ==
"OrderDiscount")
188 $productName =
"Знижка";
198 $arBasket[
"PRICE"] * $arBasket[
"QUANTITY"],
199 $arBasket[
"CURRENCY"],
205 foreach ($arBasket[
"PROPS"] as $vv)
208 for (
$i = 1;
$i <= 7;
$i++)
211 $sum += doubleval($arBasket[
"PRICE"] * $arBasket[
"QUANTITY"]);
212 $vat = max(
$vat, $arBasket[
"VAT_RATE"]);
216 if (DoubleVal(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"]) > 0)
220 $sDeliveryItem =
"Доставка";
221 if ($arDelivery_tmp[
"NAME"] <>
'')
222 $sDeliveryItem .= sprintf(
" (%s)", $arDelivery_tmp[
"NAME"]);
229 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"],
230 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
235 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"],
236 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
241 for (
$i = 1;
$i <= 7;
$i++)
244 $sum += doubleval(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"]);
266 array(
"APPLY_ORDER" =>
"ASC"),
280 (
$arTaxList[
"IS_IN_PRICE"] ==
"Y") ?
"У тому числі " :
"",
288 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
298 if (DoubleVal(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SUM_PAID"]) > 0)
308 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SUM_PAID"],
309 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
317 if (DoubleVal(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"DISCOUNT_VALUE"]) > 0)
327 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"DISCOUNT_VALUE"],
328 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
344 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SHOULD_PAY"],
345 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
357 $arColsCaption =
array(
366 for (
$i = 1;
$i <= 7;
$i++)
369 for (
$i = 1;
$i <= 7;
$i++)
380for (
$i = 1;
$i <= 7;
$i++)
382 if ($showVat ||
$i != 6)
384 ${
"x$i"} =
$pdf->GetX();
392for (
$i = 0;
$i <= 7;
$i++)
394 if ($showVat ||
$i != 6)
404 for ($j = 1; $j <= 7; $j++)
408 $accumulated += $arRowsWidth_tmp[$j];
409 $arRowsWidth_tmp[$j] =
null;
413 $arRowsWidth_tmp[$j] += $accumulated;
426 $cellWidth = $arRowsWidth_tmp[2];
431 $cellWidth = $arRowsWidth_tmp[6];
439 $pdf->Cell($arRowsWidth_tmp[1], 15, (
$l == 0) ?
$arCells[
$n][1] :
'', 0, 0,
'C');
444 $pdf->Cell($arRowsWidth_tmp[2], 15, $string);
449 $pdf->Cell($arRowsWidth_tmp[3], 15, (
$l == 0) ?
$arCells[
$n][3] :
'', 0, 0,
'R');
454 $pdf->Cell($arRowsWidth_tmp[4], 15, (
$l == 0) ?
$arCells[
$n][4] :
'', 0, 0,
'R');
459 $pdf->Cell($arRowsWidth_tmp[5], 15, (
$l == 0) ?
$arCells[
$n][5] :
'', 0, 0,
'R');
466 $pdf->Cell($arRowsWidth_tmp[6], 15, $string, 0, 0,
'R');
468 $pdf->Cell($arRowsWidth_tmp[6], 15, (
$l == 0) ?
$arCells[
$n][6] :
'', 0, 0,
'R');
474 $pdf->Cell($arRowsWidth_tmp[7], 15, (
$l == 0) ?
$arCells[
$n][7] :
'', 0, 0,
'R');
481 if (isset($arProps[
$n]) && is_array($arProps[
$n]))
484 foreach ($arProps[
$n] as $property)
486 $pdf->Cell($arRowsWidth_tmp[1], 12,
'');
487 $pdf->Cell($arRowsWidth_tmp[2], 12, $property);
488 $pdf->Cell($arRowsWidth_tmp[3], 12,
'');
489 $pdf->Cell($arRowsWidth_tmp[4], 12,
'');
490 $pdf->Cell($arRowsWidth_tmp[5], 12,
'');
492 $pdf->Cell($arRowsWidth_tmp[6], 12,
'');
493 $pdf->Cell($arRowsWidth_tmp[7], 12,
'', 0, 1);
503 if ($showVat ||
$i != 5)
514 "Всього найменувань: %s, на суму %s",
516 ($arOrder[
"CURRENCY"] ==
"UAH")
518 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SHOULD_PAY"],
520 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"]
523 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SHOULD_PAY"],
524 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
534 ($arOrder[
"CURRENCY"] ==
"UAH")
556 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
566 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
579 if ($stampHeight && $stampWidth)
581 if ($stampHeight > 120 || $stampWidth > 120)
583 $ratio = 120 / max($stampHeight, $stampWidth);
584 $stampHeight = $ratio * $stampHeight;
585 $stampWidth = $ratio * $stampWidth;
591 $stampWidth, $stampHeight
606 if ($signHeight && $signWidth)
608 $ratio = min(37.5/$signHeight, 150/$signWidth);
609 $signHeight = $ratio * $signHeight;
610 $signWidth = $ratio * $signWidth;
623 $pdf->GetX() + 80 - $signWidth/2,
$pdf->GetY() - $signHeight + 15,
624 $signWidth, $signHeight
629$pdf->Cell(160, 15,
'',
'B', 0,
'C');
649 "Рахунок дійсний до сплати до %s",
664 'Rakhunok No%s vid %s.pdf',
665 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"ACCOUNT_NUMBER"],
static GetParamValue($key, $defaultValue=null)
static GetCurrencyFormat($currency, $lang=LANGUAGE_ID)
static GetList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
static GetPropsList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
static GetList($arOrder=array("TAX_NAME"=> "ASC"), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
static prepareToPdf($string)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
ConvertDateTime($datetime, $to_format=false, $from_site=false, $bSearchInSitesOnly=false)
HTMLToTxt($str, $strSiteUrl="", $aDelete=[], $maxlen=70)
for( $i=0, $max=count( $arBasketIDs);$i< $max;$i++) if($arOrder['DELIVERY_VAT_RATE'] > 0) if(is_array( $arBasketOrder) &&!empty( $arBasketOrder)) if(floatval($arOrder["DISCOUNT_VALUE"]) > 0) $arTaxList
</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("DATE_PAY_BEFORE", false)) $dbBasket
if(CSalePaySystemAction::GetParamValue('BACKGROUND', false)) $margin
if(!empty($sellerData)) $dest
$arPaySysAction["ENCODING"]
SaleFormatCurrency($fSum, $strCurrency, $OnlyValue=false, $withoutFormat=false)
const SALE_VALUE_PRECISION
Number2Word_Rus($source, $IS_MONEY="Y", $currency="")
$GLOBALS['_____370096793']