From c007097d7539990c92b6e5399f1eb715e33f5ba6 Mon Sep 17 00:00:00 2001
From: Colin Campbell <colin.campbell@ptfs-europe.com>
Date: Tue, 16 Oct 2018 16:27:17 +0100
Subject: [PATCH] Bug 21580: Pass buyer_ean to create_edi_order

create_edi_order requires two parameters to be passed
but if vendor was set to auto_order the subroutine
was called with basketno only resulting in the error
'no basket or ean passed' - pass the buyer_ean as
passed in the quotes message

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
---
 Koha/EDI.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Koha/EDI.pm b/Koha/EDI.pm
index 54edf00aa7..5770d7dd52 100644
--- a/Koha/EDI.pm
+++ b/Koha/EDI.pm
@@ -541,7 +541,7 @@ sub process_quote {
         for my $b (@added_baskets) {
             create_edi_order(
                 {
-
+                    ean      => $messages->[0]->buyer_ean,
                     basketno => $b,
                 }
             );
-- 
2.11.0