mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for column types in designer
This commit is contained in:
parent
d254ff5336
commit
1662e04671
@ -844,10 +844,12 @@ class PdfBuilder
|
|||||||
public function processTaxColumns(string $type): void
|
public function processTaxColumns(string $type): void
|
||||||
{
|
{
|
||||||
if ($type == 'product') {
|
if ($type == 'product') {
|
||||||
|
$column_type = 'product';
|
||||||
$type_id = 1;
|
$type_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type == 'task') {
|
if ($type == 'task') {
|
||||||
|
$column_type = 'task';
|
||||||
$type_id = 2;
|
$type_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,10 +888,10 @@ class PdfBuilder
|
|||||||
array_push($taxes, sprintf('%s%s.tax_rate3', '$', $type));
|
array_push($taxes, sprintf('%s%s.tax_rate3', '$', $type));
|
||||||
}
|
}
|
||||||
|
|
||||||
$key = array_search(sprintf('%s%s.tax', '$', $type), $this->service->config->pdf_variables["{$type}_columns"], true);
|
$key = array_search(sprintf('%s%s.tax', '$', $type), $this->service->config->pdf_variables["{$column_type}_columns"], true);
|
||||||
|
|
||||||
if ($key !== false) {
|
if ($key !== false) {
|
||||||
array_splice($this->service->config->pdf_variables["{$type}_columns"], $key, 1, $taxes);
|
array_splice($this->service->config->pdf_variables["{$column_type}_columns"], $key, 1, $taxes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user