new invoice template variables for budgets (#3005)

This commit is contained in:
Kevin Papst
2021-12-08 22:15:07 +01:00
committed by GitHub
parent 82525f382d
commit 22ce6b047a
31 changed files with 389 additions and 188 deletions

View File

@@ -131,12 +131,20 @@ class DebugRendererTest extends TestCase
'customer.email',
'customer.fax',
'customer.phone',
'customer.budget_open',
'customer.budget_open_plain',
'customer.time_budget_open',
'customer.time_budget_open_plain',
'customer.mobile',
'customer.meta.foo-customer',
'activity.id',
'activity.name',
'activity.comment',
'activity.meta.foo-activity',
'activity.budget_open',
'activity.budget_open_plain',
'activity.time_budget_open',
'activity.time_budget_open_plain',
'user.alias',
'user.email',
'user.name',
@@ -146,8 +154,18 @@ class DebugRendererTest extends TestCase
'testFromModelHydrator',
];
if ($activityCounter === 1) {
$keys = array_merge($keys, [
'activity',
]);
}
if ($activityCounter > 1) {
$keys = array_merge($keys, [
'activity.1.budget_open',
'activity.1.budget_open_plain',
'activity.1.time_budget_open',
'activity.1.time_budget_open_plain',
'activity.1.id',
'activity.1.name',
'activity.1.comment',
@@ -171,7 +189,16 @@ class DebugRendererTest extends TestCase
'project.budget_time',
'project.budget_time_decimal',
'project.budget_time_minutes',
'project.budget_open',
'project.budget_open_plain',
'project.time_budget_open',
'project.time_budget_open_plain',
]);
if ($projectCounter === 1) {
$keys = array_merge($keys, [
'project',
]);
}
if ($projectCounter > 1) {
$keys = array_merge($keys, [
'project.1.id',
@@ -188,6 +215,10 @@ class DebugRendererTest extends TestCase
'project.1.budget_time',
'project.1.budget_time_decimal',
'project.1.budget_time_minutes',
'project.1.budget_open',
'project.1.budget_open_plain',
'project.1.time_budget_open',
'project.1.time_budget_open_plain',
]);
}
}