瀏覽代碼

[backend] Bug CA/poids potentiel toujours nul

dev
Guillaume Bourgeois 5 年之前
父節點
當前提交
9c246c8c77
共有 1 個檔案被更改,包括 6 行新增4 行删除
  1. +6
    -4
      backend/controllers/DistributionController.php

+ 6
- 4
backend/controllers/DistributionController.php 查看文件

@@ -133,15 +133,17 @@ class DistributionController extends BackendController
if($product['quantity_remaining'] < 0) $product['quantity_remaining'] = 0 ;
$product['quantity_form'] = 0 ;
if($product['productDistribution'][0]['active']) {
$potentialRevenues += $product['quantity_max'] * $product['price'];
$potentialWeight += $product['quantity_max'] * $product['weight'] / 1000;
if($product['productDistribution'][0]['active'] && $product['productDistribution'][0]['quantity_max']) {
$potentialRevenues += $product['productDistribution'][0]['quantity_max'] * $product['price'];
$potentialWeight += $product['productDistribution'][0]['quantity_max'] * $product['weight'] / 1000;
}
}
$json['distribution']['potential_revenues'] = $potentialRevenues ;
$json['distribution']['potential_weight'] = $potentialWeight ;
//die('potential revenues : '.$json['distribution']['potential_revenues']) ;
$json['products'] = $productsArray ;
// orders as array

Loading…
取消
儲存