From d05def6ecadb234933a1c50ba5489f63ee42173a Mon Sep 17 00:00:00 2001
From: Bill Erickson <berickxx@gmail.com>
Date: Tue, 19 Dec 2017 17:50:38 -0500
Subject: [PATCH] LP#1739465 EDI consistent use of buyer org unit san

Use the org unit (buyer) SAN instead of the the seller SAN when the
BUYER_ID_INCLUDE_VENDCODE EDI attribute is enabled.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Boyer <jboyer@library.in.gov>
---
 Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm
index 713d7c0b11..b0349ee1bb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm
@@ -169,7 +169,7 @@ sub compile_po {
     $compiled{buyer_code} = $po->provider->edi_default->vendacct;
 
     $compiled{buyer_code} = # B&T
-        $compiled{vendor_san}.' '.$po->provider->edi_default->vendcode
+        $compiled{org_unit_san}.' '.$po->provider->edi_default->vendcode
         if $compiled{edi_attrs}->{BUYER_ID_INCLUDE_VENDCODE};
 
     $compiled{buyer_code} = $po->provider->edi_default->vendcode
-- 
2.11.0