From 8b1a1b801d18c7bd96f44672b5361be3dcb77f4b Mon Sep 17 00:00:00 2001 From: Jonathan Niles Date: Fri, 24 Mar 2017 08:14:23 +0100 Subject: [PATCH] fix(cash): use semicolons to enable CSV export This commit fixes a bug in the cash payment registry CSV export caused by a description that used commas to join lists of invoices together. By updating to semicolons, this has been fixed. However, we may wish to allow a user to change the delimiter of a CSV export file in case as user-made description breaks the export. --- client/src/js/services/CashService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/js/services/CashService.js b/client/src/js/services/CashService.js index f971dad858..2c9b6e9549 100644 --- a/client/src/js/services/CashService.js +++ b/client/src/js/services/CashService.js @@ -83,7 +83,8 @@ function CashService(Modal, Api, Exchange, Session, moment, $translate) { return invoice.reference; }); - var referencesString = invoicesReferences.join(', '); + // this must be semicolons, otherwise the CSV file breaks. + var referencesString = invoicesReferences.join('; '); var tmpl = isCaution ? 'CASH.PREPAYMENT_DESCRIPTION' : 'CASH.PAYMENT_DESCRIPTION';