[open-ils-commits] [GIT] Evergreen ILS branch master updated. 6fb3aaba241eee24be54751b63e923436c38d047
Evergreen Git
git at git.evergreen-ils.org
Tue Sep 11 17:46:58 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 6fb3aaba241eee24be54751b63e923436c38d047 (commit)
from 8310bfccaaa30d0a8171a1050b42cbb280b93653 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6fb3aaba241eee24be54751b63e923436c38d047
Author: Bill Erickson <berickxx at gmail.com>
Date: Tue Aug 7 16:26:27 2018 -0400
LP#1785887 edi_order_pusher.pl sets message account
Apply the edi_message.account value when sending EDI order messages via
edi_order_pusher.pl. This solves a problem where EDI ORDERS message
were not visible in the interface, because there was no way to complete
the permission check.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
diff --git a/Open-ILS/src/support-scripts/edi_order_pusher.pl b/Open-ILS/src/support-scripts/edi_order_pusher.pl
index 3d383f2..c6c8c11 100755
--- a/Open-ILS/src/support-scripts/edi_order_pusher.pl
+++ b/Open-ILS/src/support-scripts/edi_order_pusher.pl
@@ -183,6 +183,22 @@ for $po_id (@$po_ids) {
$message->purchase_order($po_id);
$message->message_type('ORDERS');
$message->isnew(1);
+
+ my $po = $e->retrieve_acq_purchase_order([$po_id, {
+ flesh => 2,
+ flesh_fields => {
+ acqpo => ['provider'],
+ acqpro => ['edi_default'],
+ }
+ }]);
+
+ if (!$po->provider->edi_default) {
+ announce('error', "Provider for PO $po_id has no default EDI ".
+ "account, EDI message will not be sent.");
+ next;
+ }
+
+ $message->account($po->provider->edi_default->id);
}
$message->edi($edi);
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/support-scripts/edi_order_pusher.pl | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list