From 979a75fe7084c86a820bdc836ab3ac26fa4687ae Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 9 Nov 2016 14:37:33 +0000 Subject: [PATCH] Bug 17605: [MASTER] Add currency to orders generated by quotes Content-Type: text/plain; charset=utf-8 Sets the vendors currency in the edi generated order The currency used is agreed between vendor and library and the value in the quote is optional Edifact potentially allows the currency to be overwitten by specifying another currency in the CUX segment but we know currently of no supplier doing this Signed-off-by: Alex Buckley Signed-off-by: Marcel de Rooy --- Koha/EDI.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/EDI.pm b/Koha/EDI.pm index f3206ff..1a15507 100644 --- a/Koha/EDI.pm +++ b/Koha/EDI.pm @@ -36,6 +36,7 @@ use Koha::Edifact; use Log::Log4perl; use Text::Unidecode; use Koha::Plugins::Handler; +use Koha::Acquisition::Booksellers; our $VERSION = 1.1; our @EXPORT_OK = @@ -577,6 +578,7 @@ sub quote_item { } $order_quantity = 1; # attempts to create an orderline for each gir } + my $vendor = Koha::Acquisition::Booksellers->find( $quote->vendor_id ); # database definitions should set some of these defaults but dont my $order_hash = { @@ -593,6 +595,7 @@ sub quote_item { uncertainprice => 0, sort1 => q{}, sort2 => q{}, + currency => $vendor->listprice(), }; # suppliers references -- 2.1.4