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.quantity => $task.hours
|
||||
|
||||
nlog("{$key} => {$cell}");
|
||||
|
||||
if ($cell == '$task.rate') {
|
||||
$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) {
|
||||
|
@ -151,16 +151,22 @@ trait DesignHelpers
|
||||
public function processTaxColumns(string $type): void
|
||||
{
|
||||
$column_type = $type;
|
||||
if ($type == 'product' || $type == 'product_quote') {
|
||||
|
||||
if ($type == 'product') {
|
||||
$type_id = 1;
|
||||
$column_type = 'product_quote';
|
||||
$type = 'product';
|
||||
}
|
||||
|
||||
if ($type == 'task') {
|
||||
$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.
|
||||
// However, "pdf_variables" contains "$task.tax" or "$product.tax" <-- Notice the dollar sign.
|
||||
// This sprintf() will help us convert "task" or "product" into "$task" or "$product" without
|
||||
|
Loading…
x
Reference in New Issue
Block a user