[-] BO : Fix accented char
This commit is contained in:
@@ -78,16 +78,16 @@ class AdminAccountingExportControllerCore extends AdminController
|
|||||||
'type' => 'global_export',
|
'type' => 'global_export',
|
||||||
'file' => 'accounting_global_export.csv',
|
'file' => 'accounting_global_export.csv',
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'invoice_date' => $this->l('Invoice Date'),
|
'invoice_date' => $this->l('Invoice Date', 'AdminTab', false, false),
|
||||||
'journal' => $this->l('Journal'),
|
'journal' => $this->l('Journal', 'AdminTab', false, false),
|
||||||
'account' => $this->l('Account'),
|
'account' => $this->l('Account', 'AdminTab', false, false),
|
||||||
'invoice_number' => $this->l('Invoice Number'),
|
'invoice_number' => $this->l('Invoice Number', 'AdminTab', false, false),
|
||||||
'credit' => $this->l('Credit (TTC)'),
|
'credit' => $this->l('Credit (TTC)', 'AdminTab', false, false),
|
||||||
'debit' => $this->l('Debit (TVA+HT)'),
|
'debit' => $this->l('Debit (TVA+HT)', 'AdminTab', false, false),
|
||||||
'transaction_id' => $this->l('Transaction Number'),
|
'transaction_id' => $this->l('Transaction Number', 'AdminTab', false, false),
|
||||||
'payment_type' => $this->l('Payment Type'),
|
'payment_type' => $this->l('Payment Type', 'AdminTab', false, false),
|
||||||
'currency_code' => $this->l('Currency Code'),
|
'currency_code' => $this->l('Currency Code', 'AdminTab', false, false),
|
||||||
'wording' => $this->l('Wording')
|
'wording' => $this->l('Wording', 'AdminTab', false, false)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'reconciliation_export' => array(
|
'reconciliation_export' => array(
|
||||||
@@ -95,12 +95,12 @@ class AdminAccountingExportControllerCore extends AdminController
|
|||||||
'type' => 'reconciliation_export',
|
'type' => 'reconciliation_export',
|
||||||
'file' => 'accounting_reconciliation_export.csv',
|
'file' => 'accounting_reconciliation_export.csv',
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'invoice_number' => $this->l('Invoice Number'),
|
'invoice_number' => $this->l('Invoice Number', 'AdminTab', false, false),
|
||||||
'wording' => $this->l('Wording'),
|
'wording' => $this->l('Wording', 'AdminTab', false, false),
|
||||||
'total_paid_real' => $this->l('Total TTC'),
|
'total_paid_real' => $this->l('Total TTC', 'AdminTab', false, false),
|
||||||
'invoice_date' => $this->l('Invoice Date'),
|
'invoice_date' => $this->l('Invoice Date', 'AdminTab', false, false),
|
||||||
'transaction_id' => $this->l('Transaction Number'),
|
'transaction_id' => $this->l('Transaction Number', 'AdminTab', false, false),
|
||||||
'account_client' => $this->l('Account client')
|
'account_client' => $this->l('Account client', 'AdminTab', false, false)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -222,8 +222,8 @@ class AdminAccountingExportControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
foreach($this->exportTypeList[$this->exportSelected]['fields'] as $key => $translation)
|
foreach($this->exportTypeList[$this->exportSelected]['fields'] as $key => $translation)
|
||||||
$buffer .= $translation.';';
|
$buffer .= '"'.$translation.'";';
|
||||||
fwrite($this->fd, rtrim($buffer, ';')."\r\n");
|
fwrite($this->fd, mb_convert_encoding(rtrim($buffer, ';')."\r\n", 'UTF-16LE'));
|
||||||
|
|
||||||
// Bufferize line by line and write it to the file
|
// Bufferize line by line and write it to the file
|
||||||
// Todo :: Allow to configure the size of the buffer before flushing it
|
// Todo :: Allow to configure the size of the buffer before flushing it
|
||||||
@@ -231,8 +231,8 @@ class AdminAccountingExportControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
foreach ($row as $col => $val)
|
foreach ($row as $col => $val)
|
||||||
$buffer .= $val.';';
|
$buffer .= '"'.$val.'";';
|
||||||
fwrite($this->fd, rtrim($buffer, ';')."\r\n");
|
fwrite($this->fd, mb_convert_encoding(rtrim($buffer, ';')."\r\n", 'UTF-16LE'));
|
||||||
}
|
}
|
||||||
$this->confirmations[] = $this->l('Export has been successfully done');
|
$this->confirmations[] = $this->l('Export has been successfully done');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user