Browse Source

[Backend] Export pesées : gestion véhicules multiples et produits

feature/export_comptable
Guillaume 4 years ago
parent
commit
76ffc38939
3 changed files with 15 additions and 3 deletions
  1. +11
    -0
      ShopBundle/Model/Product.php
  2. +2
    -2
      ShopBundle/Repository/OrderShopRepository.php
  3. +2
    -1
      ShopBundle/Resources/translations/lcshop.fr.yaml

+ 11
- 0
ShopBundle/Model/Product.php View File

@@ -54,6 +54,17 @@ abstract class Product extends AbstractEntity implements SortableInterface, Prod
$this->status = 1;
}

public function __toString()
{
$title = $this->getProductFamily()->getTitle() ;

if($this->getTitle() && strlen($this->getTitle())) {
$title .= ' - '. $this->getTitle() ;
}

return $title ;
}

public function getBuyingPriceInherited()
{
if ($this->getBuyingPrice()) {

+ 2
- 2
ShopBundle/Repository/OrderShopRepository.php View File

@@ -165,8 +165,8 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$query->andWhere('e.deliveryAddress = :address OR e.invoiceAddress = :address')->setParameter('address', $params['address']);
}

if(isset($params['weekDeliveryTruck'])) {
$query->andWhere('e.weekDeliveryTruck = :weekDeliveryTruck')->setParameter('weekDeliveryTruck', $params['weekDeliveryTruck']);
if(isset($params['weekDeliveryTrucks'])) {
$query->andWhere('e.weekDeliveryTruck IN (:weekDeliveryTrucks)')->setParameter('weekDeliveryTrucks', $params['weekDeliveryTrucks']);
}

if(isset($params['estimatedDeliveryDateTime'])) {

+ 2
- 1
ShopBundle/Resources/translations/lcshop.fr.yaml View File

@@ -268,6 +268,7 @@ field:
metaDescription: Meta description
users: Utilisateurs
total: Total
products: Produits

PointSale:
code: Code
@@ -381,7 +382,7 @@ field:
quantityProduct: Quantité (en rapport à l'unité)
unit: Unité
OrderShop:
deliveryTruck: Véhicule de livraison
deliveryTrucks: Véhicules de livraison
createdAt: Date de création
updatedAt: Date de modification
save: Sauvegarder

Loading…
Cancel
Save