浏览代码

[Backend] Commandes : bloc documents

feature/export_comptable
Guillaume 4 年前
父节点
当前提交
bd64e3263f
共有 3 个文件被更改,包括 14 次插入7 次删除
  1. +3
    -2
      ShopBundle/Controller/Backend/DocumentController.php
  2. +8
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  3. +3
    -5
      ShopBundle/Resources/views/backend/order/macros.html.twig

+ 3
- 2
ShopBundle/Controller/Backend/DocumentController.php 查看文件

@@ -8,6 +8,7 @@ use Lc\ShopBundle\Context\DocumentInterface;
use Lc\ShopBundle\Context\MerchantUtilsInterface;
use Lc\ShopBundle\Context\OrderUtilsInterface;
use Lc\ShopBundle\Services\Utils;
use Lc\ShopBundle\Services\UtilsManager;
use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Security\Core\Security;
@@ -17,9 +18,9 @@ class DocumentController extends AdminController
{
protected $documentRepository ;

public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, Utils $utils, MerchantUtilsInterface $merchantUtils, MailjetTransport $mailjetTransport, OrderUtilsInterface $orderUtils, TranslatorInterface $translator)
public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator)
{
parent::__construct($security, $userManager, $em, $utils, $merchantUtils, $mailjetTransport, $orderUtils, $translator);
parent::__construct($security, $userManager, $em, $mailjetTransport, $utilsManager, $translator);
$this->documentRepository = $this->em->getRepository($this->em->getClassMetadata(DocumentInterface::class)->getName()) ;
}


+ 8
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml 查看文件

@@ -51,6 +51,7 @@ group:
orderStatus: Changer de status
addRedeliveryOrderProduct: Ajouter une relivraison
payment: Historique des transactions
documents: Documents
Ticket:
listMessages: Liste des messages
None: Aucune valeur
@@ -368,6 +369,13 @@ field:
closed: Fermée
yourAnswer: Votre réponse
closeTicket: Fermer la demande
Document:
typeOptions:
invoice: Facture
quotation: Devis
purchase-order: Bon de commande
delivery-note: Bon de livraison


action:
new: Créer %entity_label%

+ 3
- 5
ShopBundle/Resources/views/backend/order/macros.html.twig 查看文件

@@ -387,7 +387,7 @@
{% macro box_documents() %}
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %}

{{ macros.card_start("OrderShop.payment", 'primary card-outline') }}
{{ macros.card_start("OrderShop.documents", 'primary card-outline') }}
<table class="table table-striped">
<tbody>
<thead>
@@ -395,7 +395,6 @@
<th>Date</th>
<th>Type</th>
<th>Numéro</th>
<th>Envoyé</th>
<th>Actions</th>
</tr>
</thead>
@@ -403,11 +402,10 @@
<template v-for="(orderDocument, i) in order.orderDocuments">
<tr>
<td>${orderDocument.date}</td>
<td>${orderDocument.type}</td>
<td>Facture</td>
<td>${orderDocument.reference}</td>
<td>${orderDocument.isSent}</td>
<td>
<a :href="'./?entity=Document&action=downloadInvoice&id='+i" class="btn btn-default">Télécharger</a>
</td>
</tr>
</template>

正在加载...
取消
保存