本文整理汇总了PHP中MYPDF::getX方法的典型用法代码示例。如果您正苦于以下问题:PHP MYPDF::getX方法的具体用法?PHP MYPDF::getX怎么用?PHP MYPDF::getX使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MYPDF
的用法示例。
在下文中一共展示了MYPDF::getX方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach (tampilData($stmt3) as $grid1) {
$pdf->MultiCell(10, 7, $i, 0, 'C', false, 0, '', '', false, 0, false, false, 7, 'TB');
$pdf->MultiCell(20, 6, $grid1['no_so'], 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 6, $grid1['no_seri_produk'], 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(40, 6, $grid1['nama_produk'], 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(22, 6, number_format($grid1['harga'], 2, ',', '.'), 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(5, 6, "x", 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(17, 6, $grid1['persentase'], 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(5, 6, "x", 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(7, 6, $grid1['quantity'], 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(5, 6, "=", 0, 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(25, 6, number_format($grid1['komisi'], 2, ',', '.'), 0, 'C', false, 1, '', '', false, 0, false, false, '', 'M');
$i++;
}
$stmt2 = "select sum(komisi) as total from komisi where no_nis_sales = '{$nis}' AND cabang = '{$cabang}' AND tanggal_so BETWEEN '{$begin}' AND '{$end}'";
foreach (tampilData($stmt2) as $total) {
}
$pdf->SetFont('helvetica', 'BI', 7);
$pdf->MultiCell(151, 7, "Total Komisi", 'TB', 'C', false, 0, '', '', false, 0, false, false, 7, 'TB');
$pdf->MultiCell(25, 6, number_format($total['total'], 2, ',', '.'), 'TB', 'C', false, 1, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(15, 7, "Terbilang", 0, 'L', false, 0, '', '', false, 0, false, false, 7, 'T');
$pdf->MultiCell(175, 7, ": " . terbilang($total['total'], 4) . " rupiah", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->setXY($pdf->getX(), $pdf->getY() + 10);
$pdf->Line(0, $pdf->getY(), 215, $pdf->getY());
$pdf->setXY($pdf->getX(), $pdf->getY() + 10);
$y = 297 - $pdf->getY();
if ($y <= 40) {
$pdf->AddPage();
}
}
$pdf->Output($cabang . " - " . $dataCabang['nama_cabang'] . " (" . $begin . " s.d " . $end . ")-KOMISI.pdf", 'I');
示例2: max
} else {
if (isset($columns['from'])) {
$time_width += $pdf->GetStringWidth(strftime($timeformat, $row['time_in']));
} else {
$time_width += $pdf->GetStringWidth(strftime($timeformat, $row['time_out']));
}
}
$max_time_width = max($max_time_width, $time_width);
}
$max_time_width += 10;
$max_money_width += 10;
$widths = $pdf->columnWidths($max_time_width, $max_money_width);
$pdf->printRows($customer[$project_id], $widths);
if (isset($columns['wage']) && isset($columns['dec_time'])) {
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1] + $widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->timespan($pdf->timeSum), '', 0, 0, true, 'R');
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1], 6, $pdf->getX(), $pdf->getY(), $kga['lang']['export_extension']['finalamount'] . ':', '', 0, 0, true, 'R');
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->money($pdf->moneySum), '', 0, 0, true, 'R');
} else {
if (isset($columns['wage'])) {
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1], 6, $pdf->getX(), $pdf->getY(), $kga['lang']['export_extension']['finalamount'] . ':', '', 0, 0, true, 'R');
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->money($pdf->moneySum), '', 0, 0, true, 'R');
} else {
if (isset($columns['dec_time'])) {
$pdf->ln();
$pdf->WriteHtmlCell($widths[0] + $widths[1], 6, $pdf->getX(), $pdf->getY(), $kga['lang']['export_extension']['finalamount'] . ':', '', 0, 0, true, 'R');
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(), $pdf->getY(), $pdf->timespan($pdf->timeSum), '', 0, 0, true, 'R');
}
}
示例3:
$pdf->MultiCell(20, 7, "Tgl SO", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, "No Seri", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, "Nama Produk", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(15, 7, "Quantity", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, "NIS", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, "Nama Sales", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, "Nama Qustomer", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(25, 7, "Telp", 'TB', 'C', false, 1, '', '', false, 0, false, false, '', 'M');
$pdf->SetFont('helvetica', '', 7);
$i = 1;
foreach (tampilData($stmt) as $grid) {
$pdf->setXY(15, 55 + 7 * ($i - 1));
if ($i % 2 == 0) {
$pdf->setFillColor(198, 200, 198);
} else {
$pdf->setFillColor(231, 232, 231);
}
$pdf->MultiCell(10, 7, $i, 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(15, 7, $grid['no_so'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, $grid['tanggal_so'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, $grid['no_seri_produk'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, $grid['nama_produk'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(15, 7, $grid['quantity'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, $grid['no_nis_sales'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, $grid['nama_sales'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(50, 7, $grid['nama_customer'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(25, 7, $grid['telp_customer'], 0, 'C', true, 1, '', '', false, 0, false, false, '', 'M');
$i++;
}
$pdf->Line($pdf->getX() - 14.5, $pdf->getY() + 3, 280, $pdf->getY() + 3);
$pdf->Output('example_001.pdf', 'I');
示例4:
$pdf->SetFont('helvetica', '', 7);
$pdf->setXY(15, 40);
$pdf->Cell(0, 0, 'Periode ' . $begin . ' - ' . $end, 0, 2, 'L', 0, '', '');
$pdf->SetFont('helvetica', 'B', 7);
$pdf->setXY(15, 45);
$pdf->MultiCell(10, 7, "No", 'TB', 'C', false, 0, '', '', false, 0, false, false, 7, 'M');
$pdf->MultiCell(30, 7, "NIS", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(60, 7, "Nama Sales", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, "Jumlah SO", 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, "Komisi", 'TB', 'C', false, 1, '', '', false, 0, false, false, '', 'M');
$pdf->SetFont('helvetica', '', 7);
$i = 1;
foreach (tampilData($stmt) as $grid) {
$pdf->setXY(15, 55 + 7 * ($i - 1));
if ($i % 2 == 0) {
$pdf->setFillColor(198, 200, 198);
} else {
$pdf->setFillColor(231, 232, 231);
}
$pdf->MultiCell(10, 7, $i, 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, $grid['nis'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(60, 7, $grid['nama'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(20, 7, $grid['total_so'], 0, 'C', true, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, number_format($grid['komisi'], 2, ',', '.'), 0, 'C', true, 1, '', '', false, 0, false, false, '', 'M');
$i++;
}
$pdf->setXY($pdf->getX() - 14.5, $pdf->getY() + 3);
$pdf->SetFont('helvetica', 'B', 7);
$pdf->MultiCell(120, 7, 'TOTAL', 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->MultiCell(30, 7, number_format($total['total'], 2, ',', '.'), 'TB', 'C', false, 0, '', '', false, 0, false, false, '', 'M');
$pdf->Output('Laporan_Komisi_Sales.pdf', 'I');