mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for custom quote columns
This commit is contained in:
parent
b47253ba45
commit
58cb6ec874
@ -874,6 +874,8 @@ class Design extends BaseDesign
|
|||||||
// $task.cost => $task.rate
|
// $task.cost => $task.rate
|
||||||
// $task.quantity => $task.hours
|
// $task.quantity => $task.hours
|
||||||
|
|
||||||
|
nlog("{$key} => {$cell}");
|
||||||
|
|
||||||
if ($cell == '$task.rate') {
|
if ($cell == '$task.rate') {
|
||||||
$element['elements'][] = ['element' => 'td', 'content' => $row['$task.cost'], 'properties' => ['data-ref' => 'task_table-task.cost-td']];
|
$element['elements'][] = ['element' => 'td', 'content' => $row['$task.cost'], 'properties' => ['data-ref' => 'task_table-task.cost-td']];
|
||||||
} elseif ($cell == '$product.discount' && !$this->company->enable_product_discount) {
|
} elseif ($cell == '$product.discount' && !$this->company->enable_product_discount) {
|
||||||
|
@ -151,15 +151,21 @@ trait DesignHelpers
|
|||||||
public function processTaxColumns(string $type): void
|
public function processTaxColumns(string $type): void
|
||||||
{
|
{
|
||||||
$column_type = $type;
|
$column_type = $type;
|
||||||
if ($type == 'product' || $type == 'product_quote') {
|
|
||||||
|
if ($type == 'product') {
|
||||||
$type_id = 1;
|
$type_id = 1;
|
||||||
$column_type = 'product_quote';
|
|
||||||
$type = 'product';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type == 'task') {
|
if ($type == 'task') {
|
||||||
$type_id = 2;
|
$type_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($type == 'product_quote') {
|
||||||
|
$type_id = 1;
|
||||||
|
$column_type = 'product_quote';
|
||||||
|
$type = 'product';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// At the moment we pass "task" or "product" as type.
|
// At the moment we pass "task" or "product" as type.
|
||||||
// However, "pdf_variables" contains "$task.tax" or "$product.tax" <-- Notice the dollar sign.
|
// However, "pdf_variables" contains "$task.tax" or "$product.tax" <-- Notice the dollar sign.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user