refactored invoice and export screens (#1046)

This commit is contained in:
Kevin Papst
2019-08-22 18:56:21 +02:00
committed by GitHub
parent 405ea0076b
commit 46e5650882
55 changed files with 930 additions and 906 deletions

View File

@@ -51,7 +51,7 @@ class DebugRendererTest extends TestCase
// TODO check values or formats?
}
protected function assertModelStructure(array $model, $hasProject = true, $hasActivity = false)
protected function assertModelStructure(array $model, $hasProject = true)
{
$keys = [
'invoice.due_date',
@@ -85,10 +85,14 @@ class DebugRendererTest extends TestCase
'customer.number',
'customer.homepage',
'customer.comment',
'customer.fixed_rate',
'customer.hourly_rate',
'customer.meta.foo-customer',
'activity.id',
'activity.name',
'activity.comment',
'activity.fixed_rate',
'activity.hourly_rate',
'activity.meta.foo-activity',
];
@@ -98,18 +102,12 @@ class DebugRendererTest extends TestCase
'project.name',
'project.comment',
'project.order_number',
'project.fixed_rate',
'project.hourly_rate',
'project.meta.foo-project',
]);
}
if ($hasActivity) {
$keys = array_merge($keys, [
'activity.id',
'activity.name',
'activity.comment',
]);
}
$givenKeys = array_keys($model);
sort($keys);
sort($givenKeys);