Skip to content

Commit

Permalink
LIMS-1276: Add printed date to shipping labels (#755)
Browse files Browse the repository at this point in the history
* LIMS-1276: Add printed date to shipping labels

* LIMS-1276: Improve wording

---------

Co-authored-by: Mark Williams <[email protected]>
  • Loading branch information
ndg63276 and Mark Williams authored Jul 9, 2024
1 parent bdcf74a commit 316b4d6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
25 changes: 16 additions & 9 deletions api/assets/pdf/shipment_label.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
<ol>
<li><span class="bold">Dewar Label:</span> affix this label to your dewar which ensures it can be identified at all times at the facility</li>
<li><span class="bold">Outbound Address label:</span> To be attached to the outside of your transport container for shipment to facility</li>
<li><span class="bold">Return Address Label:</span> The return address for your shipment (Please include this in your shipment, e.g. put it behind the outward bound address or in the transport container)</li>
<li><span class="bold">Return Address Label:</span> The return address for your shipment (Please include this in your shipment, e.g. put it behind the outbound label or in the transport container)</li>
</ol>
Please remove old paperwork immediately after you receive your dewar back from Diamond.
</div>


<br />
<br />

<p class="ca bold red">1. Dewar Tracking Label</p>
Expand Down Expand Up @@ -49,10 +48,6 @@
<td class="grey px150">Safety Level</td>
<td><?php echo $ship['SAFETYLEVEL'] ?></td>
</tr>
<tr>
<td class="grey px150">No. Parcels</td>
<td><?php echo sizeof($dewars) ?></td>
</tr>
</table>

<table class="center px500">
Expand All @@ -68,6 +63,10 @@
<td class="grey px150">Local Contact</td>
<td><?php echo $d['BEAMLINEOPERATOR'] ?></td>
</tr>
<tr>
<td class="grey px150">Printed on</td>
<td><?php echo date('j M o') ?></td>
</tr>
</table>

<div class="float-left px150 title-wrapper">
Expand All @@ -79,7 +78,7 @@
<?php foreach(explode(',', $d['CONTAINERSBARCODE']) as $bar_code) { ?>
<div class="container-item"><?php echo strlen($bar_code) > 15 ? substr($bar_code,0,14).'+' : $bar_code ?></div>
<?php }?>
<?php if ($d['CONTAINERS'] > 10) { ?>
<?php if ($d['CONTAINERS'] > count(explode(',', $d['CONTAINERSBARCODE']))) { ?>
<div class="container-item"><?php echo " plus " . ($d['CONTAINERS'] - count(explode(',', $d['CONTAINERSBARCODE']))) . " more" ?></div>
<?php }?>
</div>
Expand Down Expand Up @@ -158,6 +157,10 @@
<td class="grey px150">Local Contact</td>
<td><?php echo $d['BEAMLINEOPERATOR'] ?></td>
</tr>
<tr>
<td class="grey px150">Printed on</td>
<td><?php echo date('j M o') ?></td>
</tr>
</table>

<div class="left" style="width: 70px">FROM:</div>
Expand Down Expand Up @@ -250,6 +253,10 @@
<td class="grey px150">Transport Value</td>
<td><?php echo $d['TRANSPORTVALUE'] ?></td>
</tr>
<tr>
<td class="grey px150">Printed on</td>
<td><?php echo date('j M o') ?></td>
</tr>
</table>

<div class="left" style="width: 70px">FROM:</div>
Expand All @@ -267,4 +274,4 @@
<?php endif; ?>


<?php endforeach; ?>
<?php endforeach; ?>
4 changes: 2 additions & 2 deletions api/assets/pdf/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ table {
}

ol {
margin-left: 25px;
margin-left: 10px;
}

.bold {
Expand Down Expand Up @@ -185,4 +185,4 @@ ol {

.float-left {
float: left;
}
}
2 changes: 1 addition & 1 deletion api/src/Page/PDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function _shipment_label()

$this->ship = $ship;

$this->dewars = $this->db->pq("SELECT bl.beamlinename, bl.beamlineoperator, TO_CHAR(bl.startdate, 'DD-MM-YYYY') as st, d.transportvalue, d.customsvalue, d.code, d.barcode, count(cq.containerqueueid) as auto, count(c.containerid) as containers, GROUP_CONCAT(COALESCE(cr.barCode, c.code) LIMIT 10) as containersBarCode
$this->dewars = $this->db->pq("SELECT bl.beamlinename, bl.beamlineoperator, TO_CHAR(bl.startdate, 'DD-MM-YYYY') as st, d.transportvalue, d.customsvalue, d.code, d.barcode, count(cq.containerqueueid) as auto, count(c.containerid) as containers, GROUP_CONCAT(COALESCE(cr.barCode, c.code) LIMIT 8) as containersBarCode
FROM dewar d
LEFT OUTER JOIN blsession bl ON d.firstexperimentid = bl.sessionid
LEFT OUTER JOIN container c ON c.dewarid = d.dewarid
Expand Down

0 comments on commit 316b4d6

Please sign in to comment.