Quellcode durchsuchen

[Backend] Commandes : bloc documents

feature/export_comptable
Guillaume vor 4 Jahren
Ursprung
Commit
bd64e3263f
3 geänderte Dateien mit 14 neuen und 7 gelöschten Zeilen
  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 Datei anzeigen

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

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

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

Laden…
Abbrechen
Speichern