Преглед на файлове

Merge branch 'dev'

prodstable
Guillaume Bourgeois преди 4 години
родител
ревизия
8b6b655dca
променени са 1 файла, в които са добавени 5 реда и са изтрити 14 реда
  1. +5
    -14
      backend/controllers/DistributionController.php

+ 5
- 14
backend/controllers/DistributionController.php Целия файл

@@ -627,19 +627,10 @@ class DistributionController extends BackendController
$productsHasQuantity = [] ;
$cpt = 1 ;
foreach ($productsArray as $product) {
$productsHasQuantity[$product->id] = 0 ;
foreach(Product::$unitsArray as $unit => $dataUnit) {
$quantity = Order::getProductQuantity($product->id, $ordersArray, true, $unit);
if($quantity) {
$productsHasQuantity[$product->id] += $quantity ;
}
}
if($productsHasQuantity[$product->id] > 0) {
$theUnit = Product::strUnit($product->unit, 'wording_short', true) ;
$theUnit = ($theUnit == 'p.') ? '' : ' ('.$theUnit.')' ;
$productsNameArray[] = $product->name .$theUnit ;
$productsIndexArray[$product->id] = $cpt ++ ;
}
$theUnit = Product::strUnit($product->unit, 'wording_short', true) ;
$theUnit = ($theUnit == 'p.') ? '' : ' ('.$theUnit.')' ;
$productsNameArray[] = $product->name .$theUnit ;
$productsIndexArray[$product->id] = $cpt ++ ;
}
$datas[] = $productsNameArray ;

@@ -680,7 +671,7 @@ class DistributionController extends BackendController

// total point de vente
$totalsPointSaleArray = $this->_totalReportCSV(
'Total',
'Total point de vente',
$pointSale->orders,
$productsArray,
$productsIndexArray

Loading…
Отказ
Запис