Exemplo n.º 1
0
}
$pdf->Ln();
$pdf->SetY(max($y0 + $logoHeight, $pdf->GetY()));
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize * 2);
$pdf->Cell(0, 15, CSalePdf::prepareToPdf('Invoice'), 0, 0, 'C');
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME")) {
    $pdf->Write(15, CSalePdf::prepareToPdf('To'));
}
$pdf->SetFont($fontFamily, '', $fontSize);
$invoiceNo = CSalePdf::prepareToPdf($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ACCOUNT_NUMBER"]);
$invoiceNoWidth = $pdf->GetStringWidth($invoiceNo);
$invoiceDate = CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("DATE_INSERT"));
$invoiceDateWidth = $pdf->GetStringWidth($invoiceDate);
$invoiceDueDate = CSalePdf::prepareToPdf(ConvertDateTime(CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE"), FORMAT_DATE));
$invoiceDueDateWidth = $pdf->GetStringWidth($invoiceDueDate);
$invoiceInfoWidth = max($invoiceNoWidth, $invoiceDateWidth, $invoiceDueDateWidth);
$pdf->Cell(0, 15, $invoiceNo, 0, 0, 'R');
$pdf->SetFont($fontFamily, 'B', $fontSize);
$title = CSalePdf::prepareToPdf('Invoice # ');
$titleWidth = $pdf->GetStringWidth($title);
$pdf->SetX($pdf->GetX() - $invoiceInfoWidth - $titleWidth - 6);
$pdf->Write(15, $title, 0, 0, 'R');
$pdf->Ln();
$pdf->SetFont($fontFamily, '', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME")) {
    $pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("BUYER_NAME")));
Exemplo n.º 2
0
$pdf->Ln(10);
$pdf->SetFont($fontFamily, 'B', $fontSize * 3);
$pdf->SetX($pdf->GetX() + $logoWidth);
$pdf->MultiCell(0, 30, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_NAME", false)), 0, 'L');
$pdf->Ln();
$pdf->SetY(max($y0 + $logoHeight, $pdf->GetY()));
$pdf->Ln(10);
$pdf->SetFont($fontFamily, 'B', $fontSize - 2);
$seller = CSalePaySystemAction::GetParamValue("SELLER_NAME", false);
if (CSalePaySystemAction::GetParamValue("SELLER_ADDRESS", false)) {
    $seller .= ' - ';
    $seller .= CSalePaySystemAction::GetParamValue("SELLER_ADDRESS", false);
    $seller .= '  ';
}
$seller = CSalePdf::prepareToPdf($seller);
$pdf->Cell($pdf->GetStringWidth($seller), 10, $seller, 'B');
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME", false)) {
    $pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("BUYER_NAME", false)));
    $pdf->Ln();
    if (CSalePaySystemAction::GetParamValue("BUYER_ADDRESS", false)) {
        $pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("BUYER_ADDRESS", false)));
    }
    $pdf->Ln();
}
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
Exemplo n.º 3
0
}
$pdf->Ln();
$pdf->SetY(max($y0 + $logoHeight, $pdf->GetY()));
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize * 2);
$pdf->Cell(0, 15, CSalePdf::prepareToPdf('Invoice'), 0, 0, 'C');
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME", false)) {
    $pdf->Write(15, CSalePdf::prepareToPdf('To'));
}
$pdf->SetFont($fontFamily, '', $fontSize);
$invoiceNo = CSalePdf::prepareToPdf($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ACCOUNT_NUMBER"]);
$invoiceNoWidth = $pdf->GetStringWidth($invoiceNo);
$invoiceDate = CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("DATE_INSERT", false));
$invoiceDateWidth = $pdf->GetStringWidth($invoiceDate);
$invoiceDueDate = CSalePdf::prepareToPdf(ConvertDateTime(CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false), FORMAT_DATE) ?: CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false));
$invoiceDueDateWidth = $pdf->GetStringWidth($invoiceDueDate);
$invoiceInfoWidth = max($invoiceNoWidth, $invoiceDateWidth, $invoiceDueDateWidth);
$pdf->Cell(0, 15, $invoiceNo, 0, 0, 'R');
$pdf->SetFont($fontFamily, 'B', $fontSize);
$title = CSalePdf::prepareToPdf('Invoice # ');
$titleWidth = $pdf->GetStringWidth($title);
$pdf->SetX($pdf->GetX() - $invoiceInfoWidth - $titleWidth - 6);
$pdf->Write(15, $title, 0, 0, 'R');
$pdf->Ln();
$pdf->SetFont($fontFamily, '', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME", false)) {
    $pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("BUYER_NAME", false)));
Exemplo n.º 4
0
$pdf->Cell(50, 18);
$x3 = $pdf->GetX();
$pdf->Cell(0, 18);
$x4 = $pdf->GetX();
$pdf->Line($x0, $y0, $x4, $y0);
$pdf->Ln();
$y1 = $pdf->GetY();
$pdf->Line($x1, $y0, $x1, $y1);
$pdf->Cell(300, 18, CSalePdf::prepareToPdf('Получатель'));
$pdf->Cell(50, 18);
$pdf->Cell(0, 18);
$pdf->Line($x0, $y1, $x2, $y1);
$pdf->Ln();
$y2 = $pdf->GetY();
$text = CSalePaySystemAction::GetParamValue("SELLER_NAME", false);
while ($pdf->GetStringWidth($text) > 0) {
    list($string, $text) = $pdf->splitString($text, 300 - 5);
    $pdf->Cell(300, 18, CSalePdf::prepareToPdf($string));
    if ($text) {
        $pdf->Ln();
    }
}
$pdf->Cell(50, 18, CSalePdf::prepareToPdf('Сч. №'));
$pdf->Cell(0, 18, CSalePdf::prepareToPdf($sellerRs));
$pdf->Ln();
$y3 = $pdf->GetY();
$pdf->Cell(300, 18, CSalePdf::prepareToPdf('Банк получателя'));
$pdf->Cell(50, 18, CSalePdf::prepareToPdf('БИК'));
$pdf->Cell(0, 18, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_BIK", false)));
$pdf->Line($x0, $y3, $x4, $y3);
$pdf->Ln();
Exemplo n.º 5
0

$pdf->SetFont($fontFamily, 'B', $fontSize);

$pdf->Write(15, CSalePdf::prepareToPdf(sprintf(
	"Рахунок на оплату №%s від %s",
	$GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ACCOUNT_NUMBER"],
	CSalePaySystemAction::GetParamValue("DATE_INSERT")
)));
$pdf->Ln();
$pdf->Ln();

$pdf->SetFont($fontFamily, '', $fontSize);

$title = CSalePdf::prepareToPdf('Постачальник: ');
$title_width = $pdf->GetStringWidth($title);
$pdf->Write(15, $title);

$pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_NAME")));
$pdf->Ln();

$pdf->Cell($title_width, 15, '');
$pdf->MultiCell(0, 15, CSalePdf::prepareToPdf(sprintf(
	'Р/р %s, Банк %s, МФО %s',
	CSalePaySystemAction::GetParamValue("SELLER_RS"),
	CSalePaySystemAction::GetParamValue("SELLER_BANK"),
	CSalePaySystemAction::GetParamValue("SELLER_MFO")
)));

$pdf->Cell($title_width, 15, '');
$pdf->MultiCell(0, 15, CSalePdf::prepareToPdf(sprintf(
Exemplo n.º 6
0
    $pdf->Cell($width, 15, $pdf->prepareToPdf($sellerPhone), 0, 0, 'R');
    $pdf->Ln();
}
$sellerEmail = CSalePaySystemAction::GetParamValue("SELLER_EMAIL", false);
if ($sellerEmail) {
    $sellerEmail = sprintf("E-mail: %s", $sellerEmail);
    $pdf->Cell($width, 15, $pdf->prepareToPdf($sellerEmail), 0, 0, 'R');
    $pdf->Ln();
}
$pdf->SetY(max($y0 + $logoHeight, $pdf->GetY()));
$pdf->SetFont($fontFamily, '', $fontSize);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize * 1.5);
$billNo_tmp = CSalePdf::prepareToPdf(sprintf("КОММЕРЧЕСКОЕ ПРЕДЛОЖЕНИЕ № %s от %s", $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ACCOUNT_NUMBER"], CSalePaySystemAction::GetParamValue("DATE_INSERT", false)));
$billNo_width = $pdf->GetStringWidth($billNo_tmp);
$pdf->Cell(0, 20, $billNo_tmp, 0, 0, 'C');
$pdf->Ln();
$pdf->SetFont($fontFamily, '', $fontSize);
if (CSalePaySystemAction::GetParamValue("ORDER_SUBJECT", false)) {
    $pdf->Cell($width / 2 - $billNo_width / 2 - 2, 15, '');
    $pdf->MultiCell(0, 15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("ORDER_SUBJECT", false)), 0, 'L');
}
if (CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false)) {
    $pdf->Cell($width / 2 - $billNo_width / 2 - 2, 15, '');
    $pdf->MultiCell(0, 15, CSalePdf::prepareToPdf(sprintf("Срок действия %s", ConvertDateTime(CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false), FORMAT_DATE) ?: CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false))), 0, 'L');
}
$pdf->Ln();
$userFields = array();
for ($i = 1; $i <= 5; $i++) {
    $fildValue = CSalePaySystemAction::GetParamValue("USER_FIELD_{$i}", false);
Exemplo n.º 7
0
$pdf->SetX($pdf->GetX() + $logoWidth);
$pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_NAME")));
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetY(max($y0 + $logoHeight, $pdf->GetY()));
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize - 2);
$seller = CSalePaySystemAction::GetParamValue("SELLER_NAME");
if (CSalePaySystemAction::GetParamValue("SELLER_ADDRESS")) {
    $seller .= ' – ';
    $seller .= CSalePaySystemAction::GetParamValue("SELLER_ADDRESS");
    $seller .= '  ';
}
$seller = CSalePdf::prepareToPdf($seller);
$pdf->Cell($pdf->GetStringWidth($seller), 10, $seller, 'B');
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME")) {
    $pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("BUYER_NAME")));
    $pdf->Ln();
    if (CSalePaySystemAction::GetParamValue("BUYER_ADDRESS")) {
        $pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("BUYER_ADDRESS")));
    }
    $pdf->Ln();
}
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();