Browse Source

[backend] Export CSV commandes : ajout colonne commentaire

dev
Guillaume 3 years ago
parent
commit
e563e4f18c
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      backend/controllers/DistributionController.php

+ 3
- 3
backend/controllers/DistributionController.php View File

$optionCsvExportByPiece = Producer::getConfig('option_csv_export_by_piece') ; $optionCsvExportByPiece = Producer::getConfig('option_csv_export_by_piece') ;


// produits en colonne // produits en colonne
$productsNameArray = [''];
$productsNameArray = ['', 'Commentaire'];
$productsIndexArray = []; $productsIndexArray = [];
$productsHasQuantity = []; $productsHasQuantity = [];
$cpt = 1;
$cpt = 2;
foreach ($productsArray as $product) { foreach ($productsArray as $product) {
$productsHasQuantity[$product->id] = 0; $productsHasQuantity[$product->id] = 0;
foreach (Product::$unitsArray as $unit => $dataUnit) { foreach (Product::$unitsArray as $unit => $dataUnit) {
// listing commandes // listing commandes
$datas[] = ['> ' . $pointSale->name]; $datas[] = ['> ' . $pointSale->name];
foreach ($pointSale->orders as $order) { foreach ($pointSale->orders as $order) {
$orderLine = [$order->getStrUser()];
$orderLine = [$order->getStrUser(), $order->getCommentReport()];


if($optionCsvExportByPiece) { if($optionCsvExportByPiece) {
foreach ($order->productOrder as $productOrder) { foreach ($order->productOrder as $productOrder) {

Loading…
Cancel
Save