浏览代码

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

feature/export_comptable
Guillaume 4 年前
父节点
当前提交
76ffc38939
共有 3 个文件被更改,包括 15 次插入3 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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

正在加载...
取消
保存