|
|
@@ -443,6 +443,8 @@ class ProductController extends BackendController |
|
|
|
|
|
|
|
$productArray = $productManager->findProducts(); |
|
|
|
foreach($productArray as $product) { |
|
|
|
|
|
|
|
// prix produit |
|
|
|
$data[] = [ |
|
|
|
$product->name, |
|
|
|
'', |
|
|
@@ -452,18 +454,20 @@ class ProductController extends BackendController |
|
|
|
$product->price |
|
|
|
]; |
|
|
|
|
|
|
|
// prix spécifiques |
|
|
|
foreach($product->productPrice as $productPrice) { |
|
|
|
|
|
|
|
$productPrice = $productPriceManager->findOneProductPriceById($productPrice->id); |
|
|
|
|
|
|
|
$data[] = [ |
|
|
|
$product->name, |
|
|
|
$productPrice->user ? $userManager->getUsername($productPrice->user).' #'.$productPrice->user->id : '', |
|
|
|
$productPrice->userGroup ? $productPrice->userGroup->name : '', |
|
|
|
$productPrice->pointSale ? $productPrice->pointSale->name : '', |
|
|
|
$productPrice->from_quantity ?? '', |
|
|
|
$productPrice->price |
|
|
|
]; |
|
|
|
if($productPrice->user || $productPrice->userGroup || $productPrice->pointSale || $productPrice->from_quantity) { |
|
|
|
$data[] = [ |
|
|
|
$product->name, |
|
|
|
$productPrice->user ? str_replace('#', '', $userManager->getUsername($productPrice->user)).' #'.$productPrice->user->id : '', |
|
|
|
$productPrice->userGroup ? $productPrice->userGroup->name : '', |
|
|
|
$productPrice->pointSale ? $productPrice->pointSale->name : '', |
|
|
|
$productPrice->from_quantity ?? '', |
|
|
|
$productPrice->price |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|