瀏覽代碼

[backend] Formatage CA/poids

refactoring
Guillaume Bourgeois 5 年之前
父節點
當前提交
bed32573f1
共有 2 個文件被更改,包括 5 次插入6 次删除
  1. +4
    -5
      backend/controllers/DistributionController.php
  2. +1
    -1
      backend/views/distribution/index.php

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

@@ -45,6 +45,7 @@ use common\models\Producer ;
use common\models\Order ;
use common\models\User ;
use common\models\Subscription ;
use common\helpers\Price ;
use DateTime;

class DistributionController extends BackendController
@@ -109,7 +110,7 @@ class DistributionController extends BackendController
}
}
}
$json['distribution']['revenues'] = number_format($revenues, 2);
$json['distribution']['revenues'] = Price::format($revenues);
$json['distribution']['weight'] = number_format($weight, 2);
// products
@@ -139,10 +140,8 @@ class DistributionController extends BackendController
}
}
$json['distribution']['potential_revenues'] = $potentialRevenues ;
$json['distribution']['potential_weight'] = $potentialWeight ;
//die('potential revenues : '.$json['distribution']['potential_revenues']) ;
$json['distribution']['potential_revenues'] = Price::format($potentialRevenues) ;
$json['distribution']['potential_weight'] = number_format($potentialWeight, 2) ;
$json['products'] = $productsArray ;

+ 1
- 1
backend/views/distribution/index.php 查看文件

@@ -167,7 +167,7 @@ $this->setPageTitle('Distributions') ;
<span class="info-box-icon bg-yellow"><i class="fa fa-euro"></i></span>
<div class="info-box-content">
<span class="info-box-text">CA</span>
<span class="info-box-number">{{ distribution.revenues }} <span class="normal">/ {{ distribution.potential_revenues }}</span></span>
<span class="info-box-number">{{ distribution.revenues }} <span class="normal">/ {{ distribution.potential_revenues }}</span></span>
<span class="info-box-text">Poids</span>
<span class="info-box-number">{{ distribution.weight }} kg <span class="normal">/ {{ distribution.potential_weight }} kg</span></span>
</div>

Loading…
取消
儲存