[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. e5c6e5918a8e9666786cab8be76deba27cb8edcb
Evergreen Git
git at git.evergreen-ils.org
Tue Sep 11 17:46:41 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, rel_3_1 has been updated
via e5c6e5918a8e9666786cab8be76deba27cb8edcb (commit)
from 964cff660a72a14a2bc261e45b914601ebdb8362 (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 e5c6e5918a8e9666786cab8be76deba27cb8edcb
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