1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fix for client transformer (#3097)

* fix for blank client settings

* Force all custom fields to strings

* Fixes for bulk actions

* Fix for client transformer
This commit is contained in:
David Bomba 2019-11-26 21:27:44 +11:00 committed by GitHub
parent 4b4921703a
commit cec7b756e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -519,7 +519,10 @@ class InvoiceController extends BaseController
$ids = request()->input('ids');
$invoices = Invoice::withTrashed()->find($this->transformKeys($ids));
$invoices = Invoice::withTrashed()->find($this->transformKeys($ids))->whereCompanyId(auth()->user()->companyId());
if(!$invoices)
return response()->json(['message'=>'No Invoices Found']);
$invoices->each(function ($invoice, $key) use($action){

View File

@ -87,7 +87,7 @@ class ClientTransformer extends EntityTransformer
'group_settings_id' => isset($client->group_settings_id) ? (string)$this->encodePrimaryKey($client->group_settings_id) : '',
'paid_to_date' => (float) $client->paid_to_date,
'last_login' => (int)$client->last_login,
'currency_id' => (int)$client->currency_id,
'currency_id' => (string)$client->currency_id,
'address1' => $client->address1 ?: '',
'address2' => $client->address2 ?: '',
'phone' => $client->phone ?: '',