1<?
if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !==
true)
die();?><?
3if (!is_array($arOrder))
6<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
10<meta
http-equiv=
"Content-Type" content=
"text/html; charset=<?=LANG_CHARSET?>">
13 table.it td { border: 1pt solid #000000; padding: 0pt 3pt; }
14 table.inv td, table.sign td { padding: 0pt; }
15 table.sign td { vertical-
align:
top; }
28 if (intval(
$path) > 0)
30 if ($arFile = CFile::GetFileArray(
$path))
31 $path = $arFile[
'SRC'];
35 if (!in_array($backgroundStyle,
array(
'none',
'tile',
'stretch')))
36 $backgroundStyle =
'none';
40 switch ($backgroundStyle)
50 "url('%s') 0 0 repeat-y; background-size: %.02fpt %.02fpt",
70 style=
"margin: 0pt; padding: <?=join('pt ', $margin); ?>pt; width: <?=$width; ?>pt; background: <?=$background; ?>"
72 onload=
"setTimeout(window.print, 0);"
79 'style="float: left; padding-right: 5pt; "'
82<div
style=
"float: left; ">
92<div
style=
"clear: both; height: 5pt; "></div>
96<div
style=
"text-align: center; font-size: 2em"><b>Invoice</b></div>
115 <td><b>Invoice #&
nbsp;</b></td>
119 <td><b>Issue Date:&
nbsp;</b></td>
124 <td><b>Due Date:&
nbsp;</b></td>
140 array(
"NAME" =>
"ASC"),
155 $arProdProps =
array();
157 array(
"SORT" =>
"ASC",
"ID" =>
"DESC"),
159 "BASKET_ID" => $arBasket[
"ID"],
160 "!CODE" =>
array(
"CATALOG.XML_ID",
"PRODUCT.XML_ID")
164 array(
"ID",
"BASKET_ID",
"NAME",
"VALUE",
"CODE",
"SORT")
166 while ($arBasketProps = $dbBasketProps->GetNext())
168 if (!empty($arBasketProps) && $arBasketProps[
"VALUE"] !=
"")
169 $arProdProps[] = $arBasketProps;
171 $arBasket[
"PROPS"] = $arProdProps;
184 $arBasket[
"VATLESS_PRICE"] * $arBasket[
"QUANTITY"],
185 $arBasket[
"CURRENCY"],
191 foreach ($arBasket[
"PROPS"] as $vv)
194 $sum += doubleval($arBasket[
"VATLESS_PRICE"] * $arBasket[
"QUANTITY"]);
195 $vat = max(
$vat, $arBasket[
"VAT_RATE"]);
196 if ($arBasket[
"VAT_RATE"] > 0)
198 if (!isset($vats[$arBasket[
"VAT_RATE"]]))
199 $vats[$arBasket[
"VAT_RATE"]] = 0;
200 $vats[$arBasket[
"VAT_RATE"]] += ($arBasket[
"PRICE"] - $arBasket[
"VATLESS_PRICE"]) * $arBasket[
"QUANTITY"];
205 if (DoubleVal(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"]) > 0)
209 $sDeliveryItem =
"Shipping";
210 if (strlen($arDelivery_tmp[
"NAME"]) > 0)
211 $sDeliveryItem .= sprintf(
" (%s)", $arDelivery_tmp[
"NAME"]);
218 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"] / (1 +
$vat),
219 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
224 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"] / (1 +
$vat),
225 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
231 doubleval(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"] / (1 +
$vat)),
237 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE_DELIVERY"] *
$vat / (1 +
$vat),
244 if (
$sum <
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE"])
261 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"PRICE"] -
$sum - array_sum($vats),
282 foreach ($vats as $vatRate => $vatSum)
296 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
305 array(
"APPLY_ORDER" =>
"ASC"),
319 (
$arTaxList[
"IS_IN_PRICE"] ==
"Y") ?
"Included " :
"",
325 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
332 if (DoubleVal(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SUM_PAID"]) > 0)
342 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SUM_PAID"],
343 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
349 if (DoubleVal(
$GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"DISCOUNT_VALUE"]) > 0)
359 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"DISCOUNT_VALUE"],
360 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
374 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"SHOULD_PAY"],
375 $GLOBALS[
"SALE_INPUT_PARAMS"][
"ORDER"][
"CURRENCY"],
382<table
class=
"it" width=
"100%">
384 <td><nobr>#</nobr></td>
385 <td><nobr>Item / Description</nobr></td>
386 <td><nobr>Qty</nobr></td>
387 <td><nobr>Units</nobr></td>
388 <td><nobr>Unit Price</nobr></td>
389 <?
if (
$vat > 0) { ?>
390 <td><nobr>Tax</nobr></td>
392 <td><nobr>Total</nobr></td>
410 <?
if ($accumulated) {
411 ?>
style=
"border-width: 0pt 1pt 0pt 0pt" colspan=
"<?=($accumulated+1); ?>"<? $accumulated = 0;
414 <?
if (isset($arProps[
$n]) && is_array($arProps[
$n])) { ?>
415 <?
foreach ($arProps[
$n] as $property) { ?>
417 <small><?=$property; ?></small>
424 <?
for (
$i = 3;
$i <= 7;
$i++) { ?>
428 <?
if ($accumulated) { ?>
429 style=
"border-width: 0pt 1pt 0pt 0pt"
430 colspan=
"<?=(($i == 6 && $vat <= 0) ? $accumulated : $accumulated+1); ?>"
431 <? $accumulated = 0; } ?>>
452<b>Terms & Conditions</b>
456 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
458 ),
'',
array(), 0)); ?>
464 array(
'#</div>\s*<div[^>]*>#i',
'#</?div>#i'),
array(
'<br>',
'<br>'),
466 ),
'',
array(), 0)); ?>
480<table
class=
"sign" style=
"width: 100%; ">
482 <td
style=
"width: 50%; ">
501 <?
if (
$bank || $bankAddr || $bankPhone) { ?>
502 Bank Name and Address: <?
if (
$bank) { ?><?=
$bank; ?><? } ?>
505 <?
if ($bankAddr) { ?>
510 <?
if ($bankPhone) { ?>
516 Bank
's routing number: <?=$bankRouteNo; ?>
519 Bank SWIFT: <?=$bankSwift; ?>
524 <td style="width: 50%; ">
526 <div style="position: relative; "><?=CFile::ShowImage(
527 CSalePaySystemAction::GetParamValue("PATH_TO_STAMP"),
529 'style=
"position: absolute; left: 30pt; "'
532 <table style="width: 100%; position: relative; ">
537 <? if (CSalePaySystemAction::GetParamValue("SELLER_DIR") || CSalePaySystemAction::GetParamValue("SELLER_DIR_SIGN")) { ?>
538 <? if (CSalePaySystemAction::GetParamValue("SELLER_DIR")) { ?>
539 <tr><td> </td></tr>
541 <td colspan="2"><?=CSalePaySystemAction::GetParamValue("SELLER_DIR"); ?></td>
544 <? if (CSalePaySystemAction::GetParamValue("SELLER_DIR_SIGN")) { ?>
545 <tr><td> </td></tr>
547 <td><nobr>The Director</nobr></td>
548 <td style="border-bottom: 1pt solid #000000; text-align: center; ">
549 <span style="position: relative; "> <?=CFile::ShowImage(
550 CSalePaySystemAction::GetParamValue("SELLER_DIR_SIGN"),
552 'style=
"position: absolute; margin-left: -75pt; bottom: 0pt; "'
558 <? if (CSalePaySystemAction::GetParamValue("SELLER_ACC") || CSalePaySystemAction::GetParamValue("SELLER_ACC_SIGN")) { ?>
559 <? if (CSalePaySystemAction::GetParamValue("SELLER_ACC")) { ?>
560 <tr><td> </td></tr>
562 <td colspan="2"><?=CSalePaySystemAction::GetParamValue("SELLER_ACC"); ?></td>
565 <? if (CSalePaySystemAction::GetParamValue("SELLER_ACC_SIGN")) { ?>
566 <tr><td> </td></tr>
568 <td><nobr>The Accountant</nobr></td>
569 <td style="border-bottom: 1pt solid #000000; text-align: center; ">
570 <span style="position: relative; "> <?=CFile::ShowImage(
571 CSalePaySystemAction::GetParamValue("SELLER_ACC_SIGN"),
573 'style=
"position: absolute; margin-left: -75pt; bottom: 0pt; "'
static GetParamValue($key, $defaultValue=null)
static ShowImage($strImage, $iMaxW=0, $iMaxH=0, $sParams=null, $strImageUrl="", $bPopup=false, $sPopupTitle=false, $iSizeWHTTP=0, $iSizeHHTTP=0, $strImageUrlTemplate="")
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())
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)
<? endif;?> window document title
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(!empty($sellerData)) $bankAccNo
if(CSalePaySystemAction::GetParamValue('BACKGROUND', false)) $margin
SaleFormatCurrency($fSum, $strCurrency, $OnlyValue=false, $withoutFormat=false)
const SALE_VALUE_PRECISION
$GLOBALS['_____370096793']