From a895ffd1c5fbea05ded3d2233d0bda18083f3b9f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 20 May 2018 23:10:55 +0300 Subject: [PATCH] Add float casts in transformer --- app/Ninja/Transformers/ProductTransformer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Ninja/Transformers/ProductTransformer.php b/app/Ninja/Transformers/ProductTransformer.php index 453f663310..afebe57923 100644 --- a/app/Ninja/Transformers/ProductTransformer.php +++ b/app/Ninja/Transformers/ProductTransformer.php @@ -24,8 +24,8 @@ class ProductTransformer extends EntityTransformer 'id' => (int) $product->public_id, 'product_key' => $product->product_key, 'notes' => $product->notes, - 'cost' => $product->cost, - 'qty' => $product->qty, + 'cost' => (float) $product->cost, + 'qty' => (float) $product->qty, 'tax_name1' => $product->tax_name1 ?: '', 'tax_rate1' => (float) $product->tax_rate1, 'tax_name2' => $product->tax_name2 ?: '',