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:
parent
1163c42fd8
commit
cdcfcf715c
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -413,6 +413,11 @@ class Email implements ShouldQueue
|
||||
if ($address_object->address == " ") {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($address_object->address == "") {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,6 +32,8 @@ class InvoiceEmailTest extends TestCase
|
||||
use DatabaseTransactions;
|
||||
use GeneratesCounter;
|
||||
|
||||
public $faker;
|
||||
|
||||
protected function setUp() :void
|
||||
{
|
||||
parent::setUp();
|
||||
|
Loading…
Reference in New Issue
Block a user