Skip to content

Commit

Permalink
fix(cash): use semicolons to enable CSV export
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jonathan Niles authored and sfount committed Mar 24, 2017
1 parent cb43c80 commit 8b1a1b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/js/services/CashService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit 8b1a1b8

Please sign in to comment.