1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Fixes for report exports

This commit is contained in:
David Bomba 2023-10-18 15:38:45 +11:00
parent 1163c42fd8
commit cdcfcf715c
4 changed files with 14 additions and 2 deletions

View File

@ -378,6 +378,7 @@ class BaseExport
"custom_value4" => "payment.custom_value4",
"user" => "payment.user_id",
"assigned_user" => "payment.assigned_user_id",
];
protected array $expense_report_keys = [
@ -431,11 +432,11 @@ class BaseExport
];
protected array $forced_client_fields = [
"name" => "client.name",
"client.name",
];
protected array $forced_vendor_fields = [
"name" => "vendor.name",
"vendor.name",
];
protected function filterByClients($query)

View File

@ -67,10 +67,14 @@ class PaymentExport extends BaseExport
$headerdisplay = $this->buildHeader();
nlog($headerdisplay);
$header = collect($this->input['report_keys'])->map(function ($key, $value) use ($headerdisplay) {
return ['identifier' => $key, 'display_value' => $headerdisplay[$value]];
})->toArray();
nlog($header);
$report = $query->cursor()
->map(function ($resource) {
$row = $this->buildRow($resource);

View File

@ -413,6 +413,11 @@ class Email implements ShouldQueue
if ($address_object->address == " ") {
return true;
}
if ($address_object->address == "") {
return true;
}
}

View File

@ -32,6 +32,8 @@ class InvoiceEmailTest extends TestCase
use DatabaseTransactions;
use GeneratesCounter;
public $faker;
protected function setUp() :void
{
parent::setUp();