testing fix for broken edi messages user/csharp/fix-broken-vendcode-edi
authorChris Sharp <csharp@georgialibraries.org>
Tue, 13 Nov 2018 16:32:11 +0000 (11:32 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 13 Nov 2018 16:32:11 +0000 (11:32 -0500)
Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm

index b0349ee..b8c0186 100644 (file)
@@ -170,7 +170,7 @@ sub compile_po {
 
     $compiled{buyer_code} = # B&T
         $compiled{org_unit_san}.' '.$po->provider->edi_default->vendcode
-        if $compiled{edi_attrs}->{BUYER_ID_INCLUDE_VENDCODE};
+        if $compiled{edi_attrs}->{BUYER_ID_INCLUDE_VENDCODE} && defined($po->provider->edi_default->vendcode);
 
     $compiled{buyer_code} = $po->provider->edi_default->vendcode
         if $compiled{edi_attrs}->{BUYER_ID_ONLY_VENDCODE}; # MLS