فهرست منبع

Update PaypalProduct.php

1Day 3 سال پیش
والد
کامیت
fcef2c6b7c
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      app/Models/PaypalProduct.php

+ 4 - 4
app/Models/PaypalProduct.php

@@ -43,7 +43,7 @@ class PaypalProduct extends Model
     /**
     /**
      * @param mixed $value
      * @param mixed $value
      * @param string $locale
      * @param string $locale
-     * 
+     *
      * @return float
      * @return float
      */
      */
     public function formatToCurrency($value,$locale = 'en_US')
     public function formatToCurrency($value,$locale = 'en_US')
@@ -70,7 +70,7 @@ class PaypalProduct extends Model
     */
     */
     public function getTaxValue()
     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
     * @return float
     */
     */
-    public function getTotalPrice() 
+    public function getTotalPrice()
     {
     {
-        return $this->price+($this->getTaxValue());
+        return number_format($this->price+$this->getTaxValue(),2);
     }
     }
 }
 }