Browse Source

Export Evolyz en module payant

feature/rotating_product
Guillaume Bourgeois 6 months ago
parent
commit
d50ca2f9bb
6 changed files with 20 additions and 8 deletions
  1. +5
    -0
      backend/controllers/DocumentController.php
  2. +6
    -3
      backend/views/invoice/index.php
  3. +3
    -1
      backend/views/producer/update.php
  4. +2
    -1
      domain/Feature/Feature/Feature.php
  5. +3
    -2
      domain/Feature/Feature/FeatureDefinition.php
  6. +1
    -1
      frontend/views/site/service.php

+ 5
- 0
backend/controllers/DocumentController.php View File

@@ -47,6 +47,7 @@ use domain\Document\DeliveryNote\DeliveryNote;
use domain\Document\Document\Document;
use domain\Document\Invoice\Invoice;
use domain\Document\Quotation\Quotation;
use domain\Feature\Feature\Feature;
use domain\Order\Order\Order;
use domain\Order\OrderStatus\OrderStatus;
use domain\Order\ProductOrder\ProductOrder;
@@ -261,6 +262,10 @@ class DocumentController extends BackendController

public function actionExportCsvEvoliz(int $id)
{
if(!$this->getFeatureModule()->getChecker()->isEnabled(Feature::ALIAS_BRIDGE_EVOLIZ)) {
throw new yii\web\UnauthorizedHttpException("Vous n'êtes pas autorisé à effectuer cette action.");
}

$documentModule = $this->getDocumentModule();
$productOrderModule = $this->getProductOrderModule();


+ 6
- 3
backend/views/invoice/index.php View File

@@ -37,13 +37,15 @@
*/

use domain\Document\Invoice\Invoice;
use domain\Feature\Feature\Feature;
use domain\Order\Order\Order;
use yii\grid\GridView;
use yii\helpers\Html;

$producerModule = $this->getProducerModule();
$invoiceModule = $this-> getInvoiceModule();
$invoiceModule = $this-> getInvoiceModule();
$userModule = $this->getUserModule();
$featureChecker = $this->getFeatureModule()->getChecker();

$this->setTitle('Factures');
$this->addBreadcrumb($this->getTitle());
@@ -172,8 +174,9 @@ $this->addButton(['label' => 'Nouvelle facture <span class="glyphicon glyphicon-
'title' => 'Télécharger', 'class' => 'btn btn-default'
]);
},
'export-csv-evoliz' => function ($url, $invoice) use ($producerModule) {
if ($producerModule->getConfig('option_export_evoliz')) {
'export-csv-evoliz' => function ($url, $invoice) use ($producerModule, $featureChecker) {
if($featureChecker->isEnabled(Feature::ALIAS_BRIDGE_EVOLIZ)
&& $producerModule->getConfig('option_export_evoliz')) {
return Html::a('<span class="glyphicon glyphicon-save-file"></span> Evoliz', $url, [
'title' => 'Export CSV Evoliz', 'class' => 'btn btn-default'
]);

+ 3
- 1
backend/views/producer/update.php View File

@@ -456,7 +456,9 @@ $this->addBreadcrumb($this->getTitle());
->label('TVA à appliquer par défaut'); ?>
<?= $form->field($model, 'option_tax_calculation_method')
->dropDownList(Document::$taxCalculationMethodArray); ?>
<?= $form->field($model, 'option_export_evoliz')->dropDownList(Dropdown::noYesChoices()); ?>
<?php if($featureChecker->isEnabled(Feature::ALIAS_BRIDGE_EVOLIZ)): ?>
<?= $form->field($model, 'option_export_evoliz')->dropDownList(Dropdown::noYesChoices()); ?>
<?php endif; ?>
<?php $hintKeywordsPrefix = "Saisissez [ANNEE] pour intégrer l'année courante"; ?>
<?= $form->field($model, 'document_quotation_prefix')->hint($hintKeywordsPrefix); ?>
<?= $form->field($model, 'document_quotation_first_reference'); ?>

+ 2
- 1
domain/Feature/Feature/Feature.php View File

@@ -51,8 +51,9 @@ class Feature extends ActiveRecordCommon
const ALIAS_SETTINGS = 'settings';
const ALIAS_SHOP_SUPPORT = 'shop_support';
const ALIAS_SHARED_POINT_SALE = 'shared_point_sale';
const ALIAS_SUMUP_SYNCHRONIZATION = 'sumup_synchronization';
const ALIAS_BRIDGE_SUMUP = 'sumup_synchronization';
const ALIAS_SPONSORSHIP = 'sponsorship';
const ALIAS_BRIDGE_EVOLIZ = 'bridge_evoliz';

/**
* @inheritdoc

+ 3
- 2
domain/Feature/Feature/FeatureDefinition.php View File

@@ -21,8 +21,9 @@ class FeatureDefinition extends AbstractDefinition
Feature::ALIAS_SETTINGS => 'Système de paramètres',
Feature::ALIAS_SHOP_SUPPORT => 'Support boutique',
Feature::ALIAS_SHARED_POINT_SALE => 'Points de vente partagés',
Feature::ALIAS_SUMUP_SYNCHRONIZATION => "Synchronisation de commandes avec Sumup / Tiller",
Feature::ALIAS_SPONSORSHIP => "Parrainage producteurs"
Feature::ALIAS_SPONSORSHIP => "Parrainage producteurs",
Feature::ALIAS_BRIDGE_SUMUP => "Pont vers SumUp",
Feature::ALIAS_BRIDGE_EVOLIZ => "Pont vers Evoliz"
];
}
}

+ 1
- 1
frontend/views/site/service.php View File

@@ -85,7 +85,7 @@ $this->setMeta('description', "Découvrez les fonctionnalités du logiciel, les
</div>
<div class="row">
<?= block_feature("graph-up", "Statistiques et rapports de vente"); ?>
<?= block_feature("cloud-arrow-up", "Exports vers les logiciels <strong>Evoliz</strong> (comptabilité) et <strong>Tiller</strong> (caisse)"); ?>
<?= block_feature("cloud-arrow-up", "Exports vers les logiciels <strong>Evoliz</strong> (comptabilité) et <strong>SumUp</strong> (caisse)"); ?>
</div>
</div>
</div>

Loading…
Cancel
Save