Add utf conversion

This commit is contained in:
David Bomba 2024-05-01 08:32:11 +10:00
parent 3c50b27858
commit 3fed2f1a77
23 changed files with 23 additions and 0 deletions

View File

@ -122,6 +122,7 @@ class ActivityExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -144,6 +144,7 @@ class ClientExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -76,6 +76,7 @@ class ContactExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -132,6 +132,7 @@ class CreditExport extends BaseExport
$query = $this->init();
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -92,6 +92,7 @@ class DocumentExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -121,6 +121,7 @@ class ExpenseExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -131,6 +131,7 @@ class InvoiceItemExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -105,6 +105,7 @@ class PaymentExport extends BaseExport
$query = $this->init();
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -93,6 +93,7 @@ class ProductExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -112,6 +112,7 @@ class ProductSalesExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
if (count($this->input['report_keys']) == 0) {
$this->input['report_keys'] = array_values($this->entity_keys);

View File

@ -108,6 +108,7 @@ class PurchaseOrderExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -115,6 +115,7 @@ class PurchaseOrderItemExport extends BaseExport
{
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$query = $this->init();

View File

@ -113,6 +113,7 @@ class QuoteExport extends BaseExport
{
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$query = $this->init();

View File

@ -121,6 +121,7 @@ class QuoteItemExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$query = $this->init();

View File

@ -83,6 +83,7 @@ class RecurringInvoiceExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -94,6 +94,7 @@ class TaskExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
//insert the header
$this->csv->insertOne($this->buildHeader());

View File

@ -54,6 +54,7 @@ class VendorExport extends BaseExport
//load the CSV document from a string
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
if (count($this->input['report_keys']) == 0) {
$this->input['report_keys'] = array_values($this->vendor_report_keys);

View File

@ -74,6 +74,7 @@ class ARDetailReport extends BaseExport
$t->replace(Ninja::transformTranslations($this->company->settings));
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$this->csv->insertOne([]);
$this->csv->insertOne([]);

View File

@ -70,6 +70,7 @@ class ARSummaryReport extends BaseExport
$t->replace(Ninja::transformTranslations($this->company->settings));
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$this->csv->insertOne([]);
$this->csv->insertOne([]);

View File

@ -64,6 +64,7 @@ class ClientBalanceReport extends BaseExport
$t->replace(Ninja::transformTranslations($this->company->settings));
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$this->csv->insertOne([]);
$this->csv->insertOne([]);

View File

@ -68,6 +68,7 @@ class ClientSalesReport extends BaseExport
$t->replace(Ninja::transformTranslations($this->company->settings));
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$this->csv->insertOne([]);
$this->csv->insertOne([]);

View File

@ -63,6 +63,7 @@ class TaxSummaryReport extends BaseExport
$t->replace(Ninja::transformTranslations($this->company->settings));
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$this->csv->insertOne([]);
$this->csv->insertOne([]);

View File

@ -61,6 +61,7 @@ class UserSalesReport extends BaseExport
$t->replace(Ninja::transformTranslations($this->company->settings));
$this->csv = Writer::createFromString();
\League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8');
$query = Invoice::query()
->withTrashed()