Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMS-1331: Send all dispatch requests unless international via DHL for BI/MX #779

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions api/src/Page/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ function _dispatch_dewar()
}

$dew = $this->db->pq(
"SELECT d.dewarid, d.barcode, d.storagelocation, d.dewarstatus, d.externalShippingIdFromSynchrotron, s.shippingid, CONCAT(p.proposalcode, p.proposalnumber) as proposal, count(distinct c.containerId) as num_pucks, count(b.blsampleId) as num_samples
"SELECT d.dewarid, d.barcode, d.storagelocation, d.dewarstatus, d.externalShippingIdFromSynchrotron, s.shippingid, p.proposalcode, CONCAT(p.proposalcode, p.proposalnumber) as proposal, count(distinct c.containerId) as num_pucks, count(b.blsampleId) as num_samples
FROM dewar d
INNER JOIN shipping s ON s.shippingid = d.shippingid
INNER JOIN proposal p ON p.proposalid = s.proposalid
Expand Down Expand Up @@ -1275,7 +1275,14 @@ function _dispatch_dewar()
$data['BARCODE'] = $dew['BARCODE'];
$email->data = $data;

if ($country != $facility_country && !is_null($dispatch_email_intl)) {
if (
$country != $facility_country &&
array_key_exists('DELIVERYAGENT_AGENTNAME', $data) &&
$data['DELIVERYAGENT_AGENTNAME'] === 'DHL' &&
ndg63276 marked this conversation as resolved.
Show resolved Hide resolved
array_key_exists('PROPOSALCODE', $dew) &&
in_array($dew['PROPOSALCODE'], array('bi','cm','mx')) &&
!is_null($dispatch_email_intl)
) {
$recpts = $dispatch_email_intl;
} else {
$recpts = $dispatch_email;
Expand Down
Loading