From 356ce1db872a7bf31900a7fac24bbb0e922797da Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Tue, 26 Jul 2011 16:14:26 -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. --- C4/Acquisition.pm | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 09cb39c..738fe16 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'}, -- 1.7.4