示例#1
0
 function __CrmPaySysQuoteDrawFieldCell($fields, $fieldName, $caption, $width, $height, $pdf)
 {
     if ($fields[$fieldName]) {
         list($string, $text) = $pdf->splitString(CSalePdf::prepareToPdf($caption . $fields[$fieldName]), $width - 10);
         $pdf->Cell($width, $height, $string);
     } else {
         $pdf->Cell($width, $height, '');
     }
 }
示例#2
0
            if ($arResult["PAY_SYSTEM"]["NEW_WINDOW"] == "Y") {
                ?>
							<script language="JavaScript">
								window.open('<?php 
                echo $arParams["PATH_TO_PAYMENT"];
                ?>
?ORDER_ID=<?php 
                echo urlencode(urlencode($arResult["ORDER"]["ACCOUNT_NUMBER"]));
                ?>
');
							</script>
							<?php 
                echo GetMessage("SOA_TEMPL_PAY_LINK", array("#LINK#" => $arParams["PATH_TO_PAYMENT"] . "?ORDER_ID=" . urlencode(urlencode($arResult["ORDER"]["ACCOUNT_NUMBER"]))));
                ?>
							<?php 
                if (CSalePdf::isPdfAvailable() && CSalePaySystemsHelper::isPSActionAffordPdf($arResult['PAY_SYSTEM']['ACTION_FILE'])) {
                    ?>
<br />
								<?php 
                    echo GetMessage("SOA_TEMPL_PAY_PDF", array("#LINK#" => $arParams["PATH_TO_PAYMENT"] . "?ORDER_ID=" . urlencode(urlencode($arResult["ORDER"]["ACCOUNT_NUMBER"])) . "&pdf=1&DOWNLOAD=Y"));
                    ?>
								<?php 
                }
            } else {
                if (strlen($arResult["PAY_SYSTEM"]["PATH_TO_ACTION"]) > 0) {
                    include $arResult["PAY_SYSTEM"]["PATH_TO_ACTION"];
                }
            }
            ?>
					</td>
				</tr>
示例#3
0
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$arPaySysAction["ENCODING"] = "";
$ORDER_ID = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]);
if (!is_array($arOrder)) {
    $arOrder = CSaleOrder::GetByID($ORDER_ID);
}
if (!CSalePdf::isPdfAvailable()) {
    die;
}
if ($_REQUEST['BLANK'] == 'Y') {
    $blank = true;
}
$pdf = new CSalePdf('P', 'pt', 'A4');
if (CSalePaySystemAction::GetParamValue('BACKGROUND', false)) {
    $pdf->SetBackground(CSalePaySystemAction::GetParamValue('BACKGROUND', false), CSalePaySystemAction::GetParamValue('BACKGROUND_STYLE', false));
}
$pageWidth = $pdf->GetPageWidth();
$pageHeight = $pdf->GetPageHeight();
$pdf->AddFont('Font', '', 'pt_sans-regular.ttf', true);
$pdf->AddFont('Font', 'B', 'pt_sans-bold.ttf', true);
$fontFamily = 'Font';
$fontSize = 10.5;
$margin = array('top' => intval(CSalePaySystemAction::GetParamValue('MARGIN_TOP', false) ?: 15) * 72 / 25.4, 'right' => intval(CSalePaySystemAction::GetParamValue('MARGIN_RIGHT', false) ?: 15) * 72 / 25.4, 'bottom' => intval(CSalePaySystemAction::GetParamValue('MARGIN_BOTTOM', false) ?: 15) * 72 / 25.4, 'left' => intval(CSalePaySystemAction::GetParamValue('MARGIN_LEFT', false) ?: 20) * 72 / 25.4);
$width = $pageWidth - $margin['left'] - $margin['right'];
$pdf->SetDisplayMode(100, 'continuous');
$pdf->SetMargins($margin['left'], $margin['top'], $margin['right']);
$pdf->SetAutoPageBreak(true, $margin['bottom']);
$pdf->AddPage();
示例#4
0
    //			);
    //		}
    if ($bExport) {
        $arResult['BUTTONS'][] = array('TITLE' => GetMessage('INVOICE_EXPORT_CSV_TITLE'), 'TEXT' => GetMessage('INVOICE_EXPORT_CSV'), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($APPLICATION->GetCurPage(), array()), array('type' => 'csv', 'ncc' => '1')), 'ICON' => 'btn-export');
        $arResult['BUTTONS'][] = array('TITLE' => GetMessage('INVOICE_EXPORT_EXCEL_TITLE'), 'TEXT' => GetMessage('INVOICE_EXPORT_EXCEL'), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($APPLICATION->GetCurPage(), array()), array('type' => 'excel', 'ncc' => '1')), 'ICON' => 'btn-export');
    }
    if (count($arResult['BUTTONS']) > 1) {
        //Force start new bar after first button
        array_splice($arResult['BUTTONS'], 1, 0, array(array('NEWBAR' => true)));
    }
    $this->IncludeComponentTemplate();
    return;
}
if ($arParams['TYPE'] == 'show' && !empty($arParams['ELEMENT_ID'])) {
    $arResult['BUTTONS'][] = array('LINKS' => array(array('DEFAULT' => true, 'TEXT' => GetMessage('INVOICE_PAYMENT_HTML'), 'TITLE' => GetMessage('INVOICE_PAYMENT_HTML_TITLE'), 'ONCLICK' => "jsUtils.OpenWindow('" . CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_PAYMENT'], array('invoice_id' => $arParams['ELEMENT_ID'])), array('PRINT' => 'Y', 'ncc' => '1')) . "', 960, 600)"), array('TEXT' => GetMessage('INVOICE_PAYMENT_HTML_BLANK'), 'TITLE' => GetMessage('INVOICE_PAYMENT_HTML_BLANK_TITLE'), 'ONCLICK' => "jsUtils.OpenWindow('" . CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_PAYMENT'], array('invoice_id' => $arParams['ELEMENT_ID'])), array('PRINT' => 'Y', 'BLANK' => 'Y', 'ncc' => '1')) . "', 960, 600)")), 'TYPE' => 'toolbar-split-left', 'ICON' => 'btn-print');
    if (is_callable(array('CSalePdf', 'isPdfAvailable')) && CSalePdf::isPdfAvailable()) {
        $arResult['BUTTONS'][] = array('LINKS' => array(array('DEFAULT' => true, 'TEXT' => GetMessage('INVOICE_PAYMENT_PDF'), 'TITLE' => GetMessage('INVOICE_PAYMENT_PDF_TITLE'), 'ONCLICK' => "jsUtils.Redirect(null, '" . CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_PAYMENT'], array('invoice_id' => $arParams['ELEMENT_ID'])), array('pdf' => 1, 'DOWNLOAD' => 'Y', 'ncc' => '1')) . "')"), array('TEXT' => GetMessage('INVOICE_PAYMENT_PDF_BLANK'), 'TITLE' => GetMessage('INVOICE_PAYMENT_PDF_BLANK_TITLE'), 'ONCLICK' => "jsUtils.Redirect(null, '" . CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_PAYMENT'], array('invoice_id' => $arParams['ELEMENT_ID'])), array('pdf' => 1, 'DOWNLOAD' => 'Y', 'BLANK' => 'Y', 'ncc' => '1')) . "')")), 'TYPE' => 'toolbar-split-left', 'ICON' => 'btn-download');
        $arResult['BUTTONS'][] = array('TEXT' => GetMessage('INVOICE_PAYMENT_EMAIL'), 'TITLE' => GetMessage('INVOICE_PAYMENT_EMAIL_TITLE'), 'LINK' => '#', 'TYPE' => 'toolbar-left', 'ICON' => 'btn-letter', 'ONCLICK' => 'onCrmInvoiceSendEmailButtClick()');
    }
    if ($bWrite) {
        $arResult['BUTTONS'][] = array('TEXT' => GetMessage('INVOICE_EDIT'), 'TITLE' => GetMessage('INVOICE_EDIT_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_EDIT'], array('invoice_id' => $arParams['ELEMENT_ID'])), 'ICON' => 'btn-edit');
    }
}
if ($arParams['TYPE'] == 'edit' && $bRead && !empty($arParams['ELEMENT_ID'])) {
    $arResult['BUTTONS'][] = array('TEXT' => GetMessage('INVOICE_SHOW'), 'TITLE' => GetMessage('INVOICE_SHOW_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_SHOW'], array('invoice_id' => $arParams['ELEMENT_ID'])), 'ICON' => 'btn-view');
}
if (($arParams['TYPE'] == 'edit' || $arParams['TYPE'] == 'show') && $bAdd && !empty($arParams['ELEMENT_ID']) && !isset($_REQUEST['copy'])) {
    $arResult['BUTTONS'][] = array('TEXT' => GetMessage('INVOICE_COPY'), 'TITLE' => GetMessage('INVOICE_COPY_TITLE'), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_EDIT'], array('invoice_id' => $arParams['ELEMENT_ID'])), array('copy' => 1)), 'ICON' => 'btn-copy');
}
$qty = count($arResult['BUTTONS']);
if (!empty($arResult['BUTTONS']) && $arParams['TYPE'] == 'edit' && empty($arParams['ELEMENT_ID'])) {
示例#5
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$ORDER_ID = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]);
if (!is_array($arOrder)) {
    $arOrder = CSaleOrder::GetByID($ORDER_ID);
}
if (!CSalePdf::isPdfAvailable()) {
    die;
}
$pdf = new CSalePdf('P', 'pt', 'A4');
if (CSalePaySystemAction::GetParamValue('BACKGROUND')) {
    $pdf->SetBackground(CSalePaySystemAction::GetParamValue('BACKGROUND'), CSalePaySystemAction::GetParamValue('BACKGROUND_STYLE'));
}
$pageWidth = $pdf->GetPageWidth();
$pageHeight = $pdf->GetPageHeight();
$pdf->AddFont('Font', '', 'pt_sans-regular.ttf', true);
$pdf->AddFont('Font', 'B', 'pt_sans-bold.ttf', true);
$fontFamily = 'Font';
$fontSize = 10.5;
$margin = array('top' => intval(CSalePaySystemAction::GetParamValue('MARGIN_TOP') ?: 15) * 72 / 25.4, 'right' => intval(CSalePaySystemAction::GetParamValue('MARGIN_RIGHT') ?: 15) * 72 / 25.4, 'bottom' => intval(CSalePaySystemAction::GetParamValue('MARGIN_BOTTOM') ?: 15) * 72 / 25.4, 'left' => intval(CSalePaySystemAction::GetParamValue('MARGIN_LEFT') ?: 20) * 72 / 25.4);
$width = $pageWidth - $margin['left'] - $margin['right'];
$pdf->SetDisplayMode(100, 'continuous');
$pdf->SetMargins($margin['left'], $margin['top'], $margin['right']);
$pdf->SetAutoPageBreak(true, $margin['bottom']);
$pdf->AddPage();
$y0 = $pdf->GetY();
$logoHeight = 0;
$logoWidth = 0;
示例#6
0
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$arPaySysAction["ENCODING"] = "";
$ORDER_ID = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]);
if (!is_array($arOrder)) {
    $arOrder = CSaleOrder::GetByID($ORDER_ID);
}
if (!CSalePdf::isPdfAvailable()) {
    die;
}
if ($_REQUEST['BLANK'] == 'Y') {
    $blank = true;
}
$pdf = new CSalePdf('P', 'pt', 'A4');
if (CSalePaySystemAction::GetParamValue('BACKGROUND', false)) {
    $pdf->SetBackground(CSalePaySystemAction::GetParamValue('BACKGROUND', false), CSalePaySystemAction::GetParamValue('BACKGROUND_STYLE', false));
}
$pageWidth = $pdf->GetPageWidth();
$pageHeight = $pdf->GetPageHeight();
$pdf->AddFont('Font', '', 'pt_sans-regular.ttf', true);
$pdf->AddFont('Font', 'B', 'pt_sans-bold.ttf', true);
$fontFamily = 'Font';
$fontSize = 10.5;
$margin = array('top' => intval(CSalePaySystemAction::GetParamValue('MARGIN_TOP', false) ?: 15) * 72 / 25.4, 'right' => intval(CSalePaySystemAction::GetParamValue('MARGIN_RIGHT', false) ?: 15) * 72 / 25.4, 'bottom' => intval(CSalePaySystemAction::GetParamValue('MARGIN_BOTTOM', false) ?: 15) * 72 / 25.4, 'left' => intval(CSalePaySystemAction::GetParamValue('MARGIN_LEFT', false) ?: 20) * 72 / 25.4);
$width = $pageWidth - $margin['left'] - $margin['right'];
$pdf->SetDisplayMode(100, 'continuous');
$pdf->SetMargins($margin['left'], $margin['top'], $margin['right']);
$pdf->SetAutoPageBreak(true, $margin['bottom']);
$pdf->AddPage();
示例#7
0
文件: pdf.php 项目: akniyev/arteva.ru
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();?><?
$arPaySysAction["ENCODING"] = "";
$ORDER_ID = IntVal($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]);
if (!is_array($arOrder))
	$arOrder = CSaleOrder::GetByID($ORDER_ID);

if (!CSalePdf::isPdfAvailable())
	die();

if ($_REQUEST['BLANK'] == 'Y')
	$blank = true;

$pdf = new CSalePdf('P', 'pt', 'A4');

if (CSalePaySystemAction::GetParamValue('BACKGROUND'))
{
	$pdf->SetBackground(
		CSalePaySystemAction::GetParamValue('BACKGROUND'),
		CSalePaySystemAction::GetParamValue('BACKGROUND_STYLE')
	);
}

$pageWidth  = $pdf->GetPageWidth();
$pageHeight = $pdf->GetPageHeight();

$pdf->AddFont('Font', '', 'pt_sans-regular.ttf', true);
$pdf->AddFont('Font', 'B', 'pt_sans-bold.ttf', true);

$fontFamily = 'Font';
$fontSize   = 10.5;
示例#8
0
						{
							?>
							<script language="JavaScript">
								window.open('<?php 
echo $arParams["PATH_TO_PAYMENT"];
?>
?ORDER_ID=<?php 
echo urlencode(urlencode($arResult["ORDER"]["ACCOUNT_NUMBER"]));
?>
');
							</script>
							<?php 
echo GetMessage("SOA_TEMPL_PAY_LINK", array("#LINK#" => $arParams["PATH_TO_PAYMENT"] . "?ORDER_ID=" . urlencode(urlencode($arResult["ORDER"]["ACCOUNT_NUMBER"]))));
?>
							<?
							if (CSalePdf::isPdfAvailable())
							{
								?><br />
								<?php 
echo GetMessage("SOA_TEMPL_PAY_PDF", array("#LINK#" => $arParams["PATH_TO_PAYMENT"] . "?ORDER_ID=" . urlencode(urlencode($arResult["ORDER"]["ACCOUNT_NUMBER"])) . "&pdf=1&DOWNLOAD=Y"));
?>
								<?
							}
						}
						else
						{
							if (strlen($arResult["PAY_SYSTEM"]["PATH_TO_ACTION"])>0)
							{
								include($arResult["PAY_SYSTEM"]["PATH_TO_ACTION"]);
							}
						}
示例#9
0
											window.open('<?php 
                            echo $arParams["PATH_TO_PAYMENT"];
                            ?>
?ORDER_ID=<?php 
                            echo $orderAccountNumber;
                            ?>
&PAYMENT_ID=<?php 
                            echo $paymentAccountNumber;
                            ?>
');
										</script>
										<?php 
                            echo Loc::getMessage("SOA_PAY_LINK", array("#LINK#" => $arParams["PATH_TO_PAYMENT"] . "?ORDER_ID=" . $orderAccountNumber . "&PAYMENT_ID=" . $paymentAccountNumber));
                            ?>
										<?php 
                            if (CSalePdf::isPdfAvailable() && $arPaySystem['IS_AFFORD_PDF']) {
                                ?>
											<br/>
											<?php 
                                echo Loc::getMessage("SOA_PAY_PDF", array("#LINK#" => $arParams["PATH_TO_PAYMENT"] . "?ORDER_ID=" . $orderAccountNumber . "&pdf=1&DOWNLOAD=Y"));
                                ?>
										<?php 
                            }
                            ?>
									<?php 
                        } else {
                            ?>
										<?php 
                            echo $arPaySystem["BUFFERED_OUTPUT"];
                            ?>
									<?php