diff --git a/app/Models/PaypalProduct.php b/app/Models/PaypalProduct.php index 2463bf00..67220c77 100644 --- a/app/Models/PaypalProduct.php +++ b/app/Models/PaypalProduct.php @@ -43,7 +43,7 @@ class PaypalProduct extends Model /** * @param mixed $value * @param string $locale - * + * * @return float */ public function formatToCurrency($value,$locale = 'en_US') @@ -70,7 +70,7 @@ class PaypalProduct extends Model */ public function getTaxValue() { - return $this->price*$this->getTaxPercent()/100; + return number_format($this->price*$this->getTaxPercent()/100,2); } /** @@ -78,8 +78,8 @@ class PaypalProduct extends Model * * @return float */ - public function getTotalPrice() + public function getTotalPrice() { - return $this->price+($this->getTaxValue()); + return number_format($this->price+$this->getTaxValue(),2); } } diff --git a/resources/views/admin/products/index.blade.php b/resources/views/admin/products/index.blade.php index 80d6e7de..d2771d5e 100644 --- a/resources/views/admin/products/index.blade.php +++ b/resources/views/admin/products/index.blade.php @@ -28,6 +28,7 @@
+
{{__('Products')}}
{{__('Create new')}} @@ -39,6 +40,7 @@ + @@ -52,6 +54,7 @@ + @@ -77,6 +80,7 @@ language: { url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("app.datatable_locale")}}.json' }, + processing: true, serverSide: true, stateSave: true,
{{__('Active')}} {{__('Name')}} {{__('Price')}}{{__('Eggs')}} {{__('Servers')}} {{__('Created at')}}