Fixes for pdf reports

This commit is contained in:
David Bomba 2024-12-03 15:13:20 +11:00
parent 72ceac2188
commit 5588b996a6
1 changed files with 12 additions and 4 deletions

View File

@ -170,17 +170,25 @@ class TaxSummaryReport extends BaseExport
$this->csv->insertOne($this->buildHeader()); $this->csv->insertOne($this->buildHeader());
$this->csv->insertOne([ctrans('texts.cash_vs_accrual')]); $this->csv->insertOne([ctrans('texts.cash_vs_accrual')]);
foreach ($accrual_map as $key => $value) { foreach ($accrual_map as $key => &$value) {
$this->csv->insertOne([$key, Number::formatMoney($value['tax_amount'], $this->company), Number::formatValue($value['tax_amount'], $this->company->currency())]); $formatted_value = Number::formatValue($value['tax_amount'], $this->company->currency());
$formatted_money = Number::formatMoney($value['tax_amount'], $this->company);
$value['tax_amount'] = $formatted_money;
$this->csv->insertOne([$key, $formatted_money, $formatted_value]);
} }
unset($value);
$this->csv->insertOne([]); $this->csv->insertOne([]);
$this->csv->insertOne([ctrans('texts.cash_accounting')]); $this->csv->insertOne([ctrans('texts.cash_accounting')]);
$this->csv->insertOne($this->buildHeader()); $this->csv->insertOne($this->buildHeader());
foreach ($cash_map as $key => $value) { foreach ($cash_map as $key => &$value) {
$this->csv->insertOne([$key, Number::formatMoney($value['tax_amount'], $this->company), Number::formatValue($value['tax_amount'], $this->company->currency())]); $formatted_value = Number::formatValue($value['tax_amount'], $this->company->currency());
$formatted_money = Number::formatMoney($value['tax_amount'], $this->company);
$value['tax_amount'] = $formatted_money;
$this->csv->insertOne([$key, $formatted_money, $formatted_value]);
} }
unset($value);
$this->csv->insertOne([]); $this->csv->insertOne([]);
$this->csv->insertOne([]); $this->csv->insertOne([]);