From 68f99cdf980222dcb557667925bd6024640cda2a Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Tue, 26 Jul 2011 14:22:53 -0400 Subject: [PATCH] Bug 6614: Remove newlines from order notes when exporting to CSV Newline is not a valid character to Text::CSV's combine() subroutine. If an order contained a note with a newline in it, that line would come out as a blank entry in the exported CSV. This patch strips such characters, globally. Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- C4/Acquisition.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 09cb39ced2..738fe1661e 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -241,6 +241,8 @@ sub GetBasketAsCSV { my @rows; foreach my $order (@orders) { my @cols; + # newlines are not valid characters for Text::CSV combine() + $order->{'notes'} =~ s/[\r\n]+//g; push(@cols, $contract->{'contractname'}, $order->{'ordernumber'}, -- 2.20.1