Example #1
0
    $isDirSign = false;
    if (!$blank && CSalePaySystemAction::GetParamValue('SELLER_DIR_SIGN', false)) {
        list($signHeight, $signWidth) = $pdf->GetImageSize(CSalePaySystemAction::GetParamValue('SELLER_DIR_SIGN', false));
        if ($signHeight && $signWidth) {
            $ratio = min(37.5 / $signHeight, 150 / $signWidth);
            $signHeight = $ratio * $signHeight;
            $signWidth = $ratio * $signWidth;
            $isDirSign = true;
        }
    }
    $sellerDirPos = CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_DIR_POS", false));
    if ($isDirSign && $pdf->GetStringWidth($sellerDirPos) <= 160) {
        $pdf->SetY($pdf->GetY() + min($signHeight, 30) - 15);
    }
    $pdf->MultiCell(150, 15, $sellerDirPos, 0, 'L');
    $pdf->SetXY($margin['left'] + 150, $pdf->GetY() - 15);
    if ($isDirSign) {
        $pdf->Image(CSalePaySystemAction::GetParamValue('SELLER_DIR_SIGN', false), $pdf->GetX() + 80 - $signWidth / 2, $pdf->GetY() - $signHeight + 15, $signWidth, $signHeight);
    }
    $x1 = $pdf->GetX();
    $pdf->Cell(160, 15, '');
    $x2 = $pdf->GetX();
    if (CSalePaySystemAction::GetParamValue("SELLER_DIR", false)) {
        $pdf->Write(15, CSalePdf::prepareToPdf('(' . CSalePaySystemAction::GetParamValue("SELLER_DIR", false) . ')'));
    }
    $pdf->Ln();
    $y2 = $pdf->GetY();
    $pdf->Line($x1, $y2, $x2, $y2);
    $pdf->Ln();
}
if (CSalePaySystemAction::GetParamValue("SELLER_ACC_POS", false)) {
Example #2
0
    $pdf->Write(15, CSalePdf::prepareToPdf(SaleFormatCurrency($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], false)));
}
$pdf->Ln();
$sellerInfo = array('NAME' => CSalePaySystemAction::GetParamValue("SELLER_NAME", false), 'ADDRESS' => CSalePaySystemAction::GetParamValue("SELLER_ADDRESS", false), 'PHONE' => CSalePaySystemAction::GetParamValue("SELLER_PHONE", false), 'INN' => CSalePaySystemAction::GetParamValue("SELLER_INN", false), 'KPP' => CSalePaySystemAction::GetParamValue("SELLER_KPP", false), 'RS' => CSalePaySystemAction::GetParamValue("SELLER_RS", false), 'BANK' => CSalePaySystemAction::GetParamValue("SELLER_BANK", false), 'BIK' => CSalePaySystemAction::GetParamValue("SELLER_BIK", false), 'BANK_CITY' => CSalePaySystemAction::GetParamValue("SELLER_BCITY", false), 'KS' => CSalePaySystemAction::GetParamValue("SELLER_KS", false));
$customerInfo = array('NAME' => CSalePaySystemAction::GetParamValue("BUYER_NAME", false), 'ADDRESS' => CSalePaySystemAction::GetParamValue("BUYER_ADDRESS", false), 'PHONE' => CSalePaySystemAction::GetParamValue("BUYER_PHONE", false), 'INN' => CSalePaySystemAction::GetParamValue("BUYER_INN", false));
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
$x0 = $pdf->GetX();
$y0 = $pdf->GetY();
if ($sellerInfo['NAME'] || $customerInfo['NAME']) {
    $colWidth = $width / 2;
    $nameWidth = $colWidth - 5;
    $pdf->MultiCell($nameWidth, 18, CSalePdf::prepareToPdf($sellerInfo['NAME']), 0, 'L');
    $lastY = $pdf->GetX();
    $pdf->SetXY($x0 + $colWidth + 5, $y0);
    $pdf->MultiCell($nameWidth, 18, CSalePdf::prepareToPdf($customerInfo['NAME']), 0, 'L');
    $pdf->SetXY($x0, max($lastY, $pdf->GetY()));
    unset($colWidth, $nameWidth, $lastY);
}
$pdf->SetFont($fontFamily, 'B', $fontSize);
if ($sellerInfo['ADDRESS'] || $customerInfo['ADDRESS']) {
    $pdf->Ln();
    $sellerAddressParts = array();
    $text = $sellerInfo['ADDRESS'] ? CSalePdf::prepareToPdf('Адрес: ' . $sellerInfo['ADDRESS']) : '';
    for ($l = 0; $pdf->GetStringWidth($text) > 0; $l++) {
        list($string, $text) = $pdf->splitString($text, 250);
        $sellerAddressParts[] = $string;
    }
    $customerAddressParts = array();
    $text = $customerInfo['ADDRESS'] ? CSalePdf::prepareToPdf('Адрес: ' . $customerInfo['ADDRESS']) : '';