mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
API Credit doesn't contain client_id #1512
This commit is contained in:
parent
bdcaf6b3f1
commit
1a27a5b77d
@ -45,7 +45,7 @@ class CreditApiController extends BaseAPIController
|
|||||||
{
|
{
|
||||||
$credits = Credit::scope()
|
$credits = Credit::scope()
|
||||||
->withTrashed()
|
->withTrashed()
|
||||||
->with(['invoice'])
|
->with(['client'])
|
||||||
->orderBy('created_at', 'desc');
|
->orderBy('created_at', 'desc');
|
||||||
|
|
||||||
return $this->listResponse($credits);
|
return $this->listResponse($credits);
|
||||||
|
@ -27,6 +27,7 @@ class CreditTransformer extends EntityTransformer
|
|||||||
'credit_number' => $credit->credit_number,
|
'credit_number' => $credit->credit_number,
|
||||||
'private_notes' => $credit->private_notes,
|
'private_notes' => $credit->private_notes,
|
||||||
'public_notes' => $credit->public_notes,
|
'public_notes' => $credit->public_notes,
|
||||||
|
'client_id' => $credit->client->public_id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user