printRows() 공개 메소드

Put a new entry into the PDF document. Decide if it's a time entry or expense entry and call the appropriate functions.
public printRows ( array $data, array $widths )
$data array the data of this entry
$widths array the widths of the columns
예제 #1
0
파일: export_pdf2.php 프로젝트: jo91/kimai
     }
     if (isset($columns['from']) && isset($columns['to'])) {
         $time_width += max($pdf->GetStringWidth(strftime($timeformat, $row['time_in'])), $pdf->GetStringWidth(strftime($timeformat, $row['time_out'])));
     } 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');