Add missing fields to jo pdf #143
This commit is contained in:
parent
afd7f61da3
commit
352dcf2809
1 changed files with 61 additions and 6 deletions
|
|
@ -1757,7 +1757,7 @@ class JobOrderController extends BaseController
|
|||
$jo_font_size = 16;
|
||||
$col1_x = $margin;
|
||||
$col2_x = 120;
|
||||
$label_width = 35;
|
||||
$label_width = 40;
|
||||
$val_width = 60;
|
||||
|
||||
// insert the logo
|
||||
|
|
@ -1904,7 +1904,7 @@ class JobOrderController extends BaseController
|
|||
$pdf->Cell($label_width, $line_height, 'Wty. Exp. Date:');
|
||||
$pdf->MultiCell($val_width, $line_height, $cv && $cv->getWarrantyExpiration() ? $cv->getWarrantyExpiration()->format("d/m/Y") : '', 0, 'L');
|
||||
|
||||
// insert address info
|
||||
// insert transaction details
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont($font_face, 'B', $header_font_size);
|
||||
$pdf->Cell($label_width, $line_height, 'Transaction Details');
|
||||
|
|
@ -1915,6 +1915,22 @@ class JobOrderController extends BaseController
|
|||
// get current Y
|
||||
$y = $pdf->GetY();
|
||||
|
||||
$pdf->Cell($label_width, $line_height, 'Warranty Class:');
|
||||
$pdf->MultiCell($val_width, $line_height, WarrantyClass::getName($obj->getWarrantyClass()), 0, 'L');
|
||||
|
||||
// get Y after left cell
|
||||
$y1 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY($col2_x, $y);
|
||||
$pdf->Cell($label_width, $line_height, 'Mode of Payment:');
|
||||
$pdf->MultiCell(0, $line_height, ModeOfPayment::getName($obj->getModeOfPayment()), 0, 'L');
|
||||
|
||||
// get Y after right cell
|
||||
$y2 = $pdf->GetY();
|
||||
|
||||
// get row height
|
||||
$y = max($y1, $y2);
|
||||
|
||||
$pdf->Cell($label_width, $line_height, 'Delivery Address:');
|
||||
$pdf->MultiCell($val_width, $line_height, $obj->getDeliveryAddress(), 0, 'L');
|
||||
|
||||
|
|
@ -1994,29 +2010,68 @@ class JobOrderController extends BaseController
|
|||
// get current Y
|
||||
$y = $pdf->GetY();
|
||||
|
||||
// insert invoice footer details
|
||||
$pdf->Cell($label_width, $line_height, 'Transaction Type:');
|
||||
$pdf->MultiCell($val_width, $line_height, ServiceType::getName($obj->getServiceType()), 0, 'L');
|
||||
|
||||
// insert footer totals
|
||||
// get Y after left cell
|
||||
$y1 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY($col2_x, $y);
|
||||
$pdf->SetFont($font_face, 'B');
|
||||
$pdf->Cell($label_width, $line_height, 'SUBTOTAL:');
|
||||
$pdf->SetFont($font_face, '');
|
||||
$pdf->MultiCell(0, $line_height, number_format($invoice->getVATExclusivePrice(), 2), 0, 'R');
|
||||
|
||||
$pdf->SetX($col2_x);
|
||||
// get Y after right cell
|
||||
$y2 = $pdf->GetY();
|
||||
|
||||
// get row height
|
||||
$y = max($y1, $y2);
|
||||
|
||||
$pdf->SetXY($col1_x, $y);
|
||||
$pdf->Cell($label_width, $line_height, 'OR Name:');
|
||||
$pdf->MultiCell($val_width, $line_height, $obj->getORName(), 0, 'L');
|
||||
|
||||
// get Y after left cell
|
||||
$y1 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY($col2_x, $y);
|
||||
$pdf->SetFont($font_face, 'B');
|
||||
$pdf->Cell($label_width, $line_height, 'TAX:');
|
||||
$pdf->SetFont($font_face, '');
|
||||
$pdf->MultiCell(0, $line_height, number_format($invoice->getVAT(), 2), 0, 'R');
|
||||
|
||||
$pdf->SetX($col2_x);
|
||||
// get Y after right cell
|
||||
$y2 = $pdf->GetY();
|
||||
|
||||
// get row height
|
||||
$y = max($y1, $y2);
|
||||
|
||||
$pdf->SetXY($col1_x, $y);
|
||||
$pdf->Cell($label_width, $line_height, 'Emp. ID/Card No./Ref. By:');
|
||||
$pdf->MultiCell($val_width, $line_height, $obj->getPromoDetail(), 0, 'L');
|
||||
|
||||
// get Y after left cell
|
||||
$y1 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY($col2_x, $y);
|
||||
$pdf->SetFont($font_face, 'B');
|
||||
$pdf->Cell($label_width, $line_height, 'DISCOUNT:');
|
||||
$pdf->SetFont($font_face, '');
|
||||
$pdf->MultiCell(0, $line_height, number_format($invoice->getDiscount(), 2), 0, 'R');
|
||||
|
||||
$pdf->SetX($col2_x);
|
||||
// get Y after right cell
|
||||
$y2 = $pdf->GetY();
|
||||
|
||||
// get row height
|
||||
$y = max($y1, $y2);
|
||||
|
||||
$pdf->SetXY($col1_x, $y);
|
||||
$pdf->Cell($label_width, $line_height, 'Discount Type:');
|
||||
$pdf->MultiCell($val_width, $line_height, $invoice->getPromo()->getName(), 0, 'L');
|
||||
|
||||
$pdf->SetXY($col2_x, $y);
|
||||
$pdf->SetFont($font_face, 'B');
|
||||
$pdf->Cell($label_width, $line_height, 'FINAL AMOUNT:');
|
||||
$pdf->MultiCell(0, $line_height, number_format($invoice->getTotalPrice(), 2), 0, 'R');
|
||||
|
|
|
|||
Loading…
Reference in a new issue