shish 3 năm trước cách đây
mục cha
commit
7a304201d3

+ 3 - 1
biz-ghs/product/classes/ProductClass.php

@@ -284,8 +284,10 @@ class ProductClass extends BaseClass
             $list[$k]['price'] = $price;
             $list[$k]['price'] = $price;
 
 
             $cost = $v['cost'] ?? 0;
             $cost = $v['cost'] ?? 0;
+            $ml = 0;
             if ($price > 0) {
             if ($price > 0) {
                 $profit = bcsub($price, $cost, 2);
                 $profit = bcsub($price, $cost, 2);
+                $ml = $profit;
                 $mll = bcdiv($profit, $price, 3);
                 $mll = bcdiv($profit, $price, 3);
                 $mll = bcmul($mll, 100);
                 $mll = bcmul($mll, 100);
                 $mll = round($mll, 1);
                 $mll = round($mll, 1);
@@ -293,7 +295,7 @@ class ProductClass extends BaseClass
                 $mll = 0;
                 $mll = 0;
             }
             }
             $list[$k]['mll'] = $mll;
             $list[$k]['mll'] = $mll;
-
+            $list[$k]['ml'] = $ml;
         }
         }
         return $list;
         return $list;
     }
     }