forked from science-ation/science-ation
Fix the conference logo not working on reports (FINALLY! god for such a stupid bug it took me forever to realize it), also tweaked the barcode code a bit
This commit is contained in:
parent
c493120128
commit
12bb399d48
@ -807,15 +807,10 @@ foreach($report_stock as $n=>$v) {
|
|||||||
case 'static_box':
|
case 'static_box':
|
||||||
$rep->label_rect($d['x'], $d['y'], $d['w'], $d['h']);
|
$rep->label_rect($d['x'], $d['y'], $d['w'], $d['h']);
|
||||||
break;
|
break;
|
||||||
case 'fair_logo':
|
case 'conference_logo':
|
||||||
$rep->label_fair_logo($d['x'], $d['y'], $d['w'], $d['h'], $show_box);
|
$rep->label_fair_logo($d['x'], $d['y'], $d['w'], $d['h'], $show_box);
|
||||||
break;
|
break;
|
||||||
|
case "projectbarcode":
|
||||||
default:
|
|
||||||
if($f == 'static_text')
|
|
||||||
$v = $d['value'];
|
|
||||||
|
|
||||||
if($f=="projectbarcode") {
|
|
||||||
$style = array(
|
$style = array(
|
||||||
'border' => 2,
|
'border' => 2,
|
||||||
'vpadding' => 'auto',
|
'vpadding' => 'auto',
|
||||||
@ -826,13 +821,16 @@ foreach($report_stock as $n=>$v) {
|
|||||||
'module_height' => 3 // height of a single module in points
|
'module_height' => 3 // height of a single module in points
|
||||||
);
|
);
|
||||||
$rep->barcode($v, 'QRCODE,H', $d['x'], $d['y'], $d['w'], $d['h'], $style, 'N');
|
$rep->barcode($v, 'QRCODE,H', $d['x'], $d['y'], $d['w'], $d['h'], $style, 'N');
|
||||||
}
|
break;
|
||||||
else {
|
|
||||||
|
default:
|
||||||
|
if($f == 'static_text')
|
||||||
|
$v = $d['value'];
|
||||||
|
|
||||||
$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
|
$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
|
||||||
$v, $show_box, $d['align'], $d['valign'],
|
$v, $show_box, $d['align'], $d['valign'],
|
||||||
$d['fontname'],$d['fontstyle'],$d['fontsize'],
|
$d['fontname'],$d['fontstyle'],$d['fontsize'],
|
||||||
$d['on_overflow']);
|
$d['on_overflow']);
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -398,6 +398,7 @@ class pdf extends TCPDF {
|
|||||||
function label_fair_logo($x, $y, $w, $h, $show_box)
|
function label_fair_logo($x, $y, $w, $h, $show_box)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
global $conference;
|
||||||
$img_dir = $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY'].'/data';
|
$img_dir = $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY'].'/data';
|
||||||
/* Scale image to proportinally fit in w x h */
|
/* Scale image to proportinally fit in w x h */
|
||||||
$this->Image($img_dir."/".$conference['id']."-logo-500.png", $this->lMargin + $x, $this->tMargin + $y,
|
$this->Image($img_dir."/".$conference['id']."-logo-500.png", $this->lMargin + $x, $this->tMargin + $y,
|
||||||
|
Loading…
Reference in New Issue
Block a user