$formattedRow['barcode'] = $layout['data']['barcode_alignment'];
}
+ // finally assign all the row values, so that we can use it for barcode etc
+ $formattedRow['values'] = $row;
+
return $formattedRow;
}
$this->pdf->SetXY($x, $y + $this->pdf->height - 5);
$this->pdf->Cell($this->pdf->width, 0, $formattedRow['token'][4]['value'], $this->border, 2,
$formattedRow['token'][4]['text_alignment']);
+
+ if (CRM_Utils_Array::value('barcode', $formattedRow)) {
+ $style = array(
+ 'position' => $formattedRow['barcode'],
+ 'align' => $formattedRow['barcode'],
+ 'stretch' => FALSE,
+ 'fitwidth' => TRUE,
+ 'cellfitalign' => '',
+ 'border' => FALSE,
+ 'hpadding' => 'auto',
+ 'vpadding' => 'auto',
+ 'fgcolor' => array(0, 0, 0),
+ 'bgcolor' => FALSE,
+ 'text' => FALSE,
+ 'font' => 'helvetica',
+ 'fontsize' => 8,
+ 'stretchtext' => 0,
+ );
+
+ $payload = $formattedRow['values']['contact_id'] . '-' . $formattedRow['values']['participant_id'];
+ $this->pdf->SetXY($x, $y + $this->pdf->height - 5);
+ $this->pdf->write1DBarcode($payload, "C128A", $x, $this->pdf->getY() - 6, 50, 10, 0.4, $style, 'B');
+ }
}
/**
}
// add additional required fields for query execution
- $additionalFields = array('participant_register_date', 'participant_id');
+ $additionalFields = array('participant_register_date', 'participant_id', 'event_id', 'contact_id');
foreach ($additionalFields as $field) {
$returnProperties[$field] = 1;
}