<?php 
use yii\helpers\Html;
?>
<div class="card ">
	<div class="card-header d-print-none">
		Service Labels
		<div class="float-right">
			<?= Html::Button('PRINT', ['onClick' => 'window.print()', 'class' => "btn btn-primary"]) ?>
			<?= Html::Button('BACK', ['onClick' => 'window.history.back();', 'class' => "btn btn-danger"]) ?>
		</div>
	</div>
	<div class="card-body">
		<table class="table table-condensed">
			<tr>
				<th>Job No:</th> 
				<td><?= $model->jobno ?></td> 
			</tr>
			<tr>
				<th>Status:</th> 
				<td><?= $model->status ?></td> 
				<td rowspan="10" class="p-0 text-center" >
					<img src="<?= \common\models\Base::Qr(base64_encode(json_encode(['type' => 'Activity', 'id' => $model->id]))); ?>" /> 
					<?php //Html::img($item->qrimage); ?>
				</td>
			</tr>
			<tr>
				<th>Date In:</th> 
				<td><?= $model->duetime; ?></td> 
			</tr>
			<tr>
				<th>Owner Info</th> 
				<td>
					<b>Name: </b><?= $model->client ? $model->client->fullname : $model->clientname ?> <br />
					<b>Email: </b><?= $model->client?->email ?> <br />
					<b>Phone: </b><?= $model->client?->address?->telephone ?> <br />
				</td> 
			</tr>
			<tr>
				<th>Collection From:</th> 
				<td><?= $model->agentl ? $model->agentl->fullname : '' ?></td> 
			</tr>
			<tr>
				<th>Collection Date:</th> 
				<td><?= $model->collectiondate  ?></td> 
			</tr>
			
			<tr>
				<th>No of Items:</th> 
				<td><?= count($model->activitiesitems)?></td> 
			</tr>
		</table> 
	</div>
</div>




<style>

@media print{

	@page{
		size: portrait;
		margin:2cm;	
		padding:0;
	}
	html, body {
		margin: none
	}

	.table{
		margin-bottom:0px;
	}
	.d-print-none{
		display:none;
	}
	.card{
		border:unset;
	}
	.card-body{
		margin:unset;
		padding:unset;
	}

	.qrcol{
		border-right: 1px solid #000;
	}

}
@media screen{

	.card-body table.rotate {
		left:0px;
		top: 0px;
		position: relative;
	}

	.collectionlabel{
		width:200mm;
		height: 60mm;
	}
	.el1{
		height:150mm;
		width:60mm;
	}
	.el2{
		height:60mm;
		width:60mm;
	}
	.el3{
		height:120mm;
		width:60mm;
	}

}
.inner-table, .inner-table td, .inner-table th{
		border: unset;
	}
	.table th, .table td{
		border-top:none;
	}
	</style>