From 0f9aae454b28bd9918f610a4da3eecd82ab24f7c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 28 Oct 2019 08:36:09 +1100 Subject: [PATCH] Update Company settings, OpenAPI documentation and Company Migration (#3025) * Insert generic for client country if not set * Invoice fixes --- app/Http/Controllers/OpenAPI/ClientSchema.php | 1 + app/Transformers/InvoiceTransformer.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/OpenAPI/ClientSchema.php b/app/Http/Controllers/OpenAPI/ClientSchema.php index ff3fb6d1862e..b343e62b26b7 100644 --- a/app/Http/Controllers/OpenAPI/ClientSchema.php +++ b/app/Http/Controllers/OpenAPI/ClientSchema.php @@ -26,6 +26,7 @@ * @OA\Property(property="city", type="string", example="", description="________"), * @OA\Property(property="state", type="string", example="", description="________"), * @OA\Property(property="postal_code", type="string", example="", description="________"), + * @OA\Property(property="phone", type="string", example="555-3434-3434", description="The client phone number"), * @OA\Property(property="country_id", type="string", example="", description="________"), * @OA\Property(property="custom_value1", type="string", example="", description="________"), * @OA\Property(property="custom_value2", type="string", example="", description="________"), diff --git a/app/Transformers/InvoiceTransformer.php b/app/Transformers/InvoiceTransformer.php index 7cc0b82771ea..c6cac02452cd 100644 --- a/app/Transformers/InvoiceTransformer.php +++ b/app/Transformers/InvoiceTransformer.php @@ -83,8 +83,8 @@ class InvoiceTransformer extends EntityTransformer { return [ 'id' => $this->encodePrimaryKey($invoice->id), - 'amount' => (float) $invoice->amount ?: '', - 'balance' => (float) $invoice->balance ?: '', + 'amount' => (float) $invoice->amount, + 'balance' => (float) $invoice->balance, 'client_id' => (string) $this->encodePrimaryKey($invoice->client_id), 'status_id' => (string) ($invoice->status_id ?: 1), 'design_id' => (string) ($invoice->design_id ?: 1),