|
From: <ex...@us...> - 2014-08-28 15:15:39
|
Revision: 6848
http://sourceforge.net/p/web-erp/reponame/6848
Author: exsonqu
Date: 2014-08-28 15:15:31 +0000 (Thu, 28 Aug 2014)
Log Message:
-----------
28/08/2014 Exson: Fixed the csv file aligned abnormal when there are commas in fields strings.
Modified Paths:
--------------
trunk/InventoryValuation.php
Modified: trunk/InventoryValuation.php
===================================================================
--- trunk/InventoryValuation.php 2014-08-28 05:26:07 UTC (rev 6847)
+++ trunk/InventoryValuation.php 2014-08-28 15:15:31 UTC (rev 6848)
@@ -206,7 +206,8 @@
$CSVListing = _('Category ID') .','. _('Category Description') .','. _('Stock ID') .','. _('Description') .','. _('Decimal Places') .','. _('Qty On Hand') .','. _('Units') .','. _('Unit Cost') .','. _('Total') . "\n";
while ($InventoryValn = DB_fetch_row($InventoryResult, $db)) {
- $CSVListing .= implode(',', $InventoryValn) . "\n";
+ $CSVListing .= '"';
+ $CSVListing .= implode('","', $InventoryValn) . '"' . "\n";
}
header('Content-Encoding: UTF-8');
header('Content-type: text/csv; charset=UTF-8');
@@ -301,4 +302,4 @@
include('includes/footer.inc');
} /*end of else not PrintPDF */
-?>
\ No newline at end of file
+?>
|