Add null check for promo type #143

This commit is contained in:
Ramon Gutierrez 2018-06-18 15:20:23 +08:00
parent 352dcf2809
commit c9d6b232ee

View file

@ -2069,7 +2069,7 @@ class JobOrderController extends BaseController
$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->MultiCell($val_width, $line_height, !empty($invoice->getPromo()) ? $invoice->getPromo()->getName() : '', 0, 'L');
$pdf->SetXY($col2_x, $y);
$pdf->SetFont($font_face, 'B');