rabin 3 vuotta sitten
vanhempi
commit
7b98792608
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      service/mail/lib/Manage.php

+ 6 - 2
service/mail/lib/Manage.php

@@ -707,7 +707,9 @@ class Manage
                 $price = ($v['price'] - $c_price);
                 $total += $price;
                 $shop[$v['type_id']] += $price * $per;
-                $shop[$v['type_id']] = round($shop[$v['type_id']], 2);
+            }
+            foreach ($shop as $k => $v) {
+                $shop[$k] = round($shop[$k], 2);
             }
         }
         
@@ -728,7 +730,9 @@ class Manage
                 $price = $v['buy'];
                 $total += $price;
                 $shop[$v['shop_id']] += $price * $per;
-                $shop[$v['shop_id']] = round($shop[$v['shop_id']], 2);
+            }
+            foreach ($shop as $k => $v) {
+                $shop[$k] = round($shop[$k], 2);
             }
         }
         return array(round($total, 2), round($total*$per, 2), $shop);