use domain\Document\Document\Document; | use domain\Document\Document\Document; | ||||
use domain\Document\Invoice\Invoice; | use domain\Document\Invoice\Invoice; | ||||
use domain\Document\Quotation\Quotation; | use domain\Document\Quotation\Quotation; | ||||
use domain\Feature\Feature\Feature; | |||||
use domain\Order\Order\Order; | use domain\Order\Order\Order; | ||||
use domain\Order\OrderStatus\OrderStatus; | use domain\Order\OrderStatus\OrderStatus; | ||||
use domain\Order\ProductOrder\ProductOrder; | use domain\Order\ProductOrder\ProductOrder; | ||||
public function actionExportCsvEvoliz(int $id) | 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(); | $documentModule = $this->getDocumentModule(); | ||||
$productOrderModule = $this->getProductOrderModule(); | $productOrderModule = $this->getProductOrderModule(); | ||||
*/ | */ | ||||
use domain\Document\Invoice\Invoice; | use domain\Document\Invoice\Invoice; | ||||
use domain\Feature\Feature\Feature; | |||||
use domain\Order\Order\Order; | use domain\Order\Order\Order; | ||||
use yii\grid\GridView; | use yii\grid\GridView; | ||||
use yii\helpers\Html; | use yii\helpers\Html; | ||||
$producerModule = $this->getProducerModule(); | $producerModule = $this->getProducerModule(); | ||||
$invoiceModule = $this-> getInvoiceModule(); | |||||
$invoiceModule = $this-> getInvoiceModule(); | |||||
$userModule = $this->getUserModule(); | $userModule = $this->getUserModule(); | ||||
$featureChecker = $this->getFeatureModule()->getChecker(); | |||||
$this->setTitle('Factures'); | $this->setTitle('Factures'); | ||||
$this->addBreadcrumb($this->getTitle()); | $this->addBreadcrumb($this->getTitle()); | ||||
'title' => 'Télécharger', 'class' => 'btn btn-default' | '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, [ | return Html::a('<span class="glyphicon glyphicon-save-file"></span> Evoliz', $url, [ | ||||
'title' => 'Export CSV Evoliz', 'class' => 'btn btn-default' | 'title' => 'Export CSV Evoliz', 'class' => 'btn btn-default' | ||||
]); | ]); |
->label('TVA à appliquer par défaut'); ?> | ->label('TVA à appliquer par défaut'); ?> | ||||
<?= $form->field($model, 'option_tax_calculation_method') | <?= $form->field($model, 'option_tax_calculation_method') | ||||
->dropDownList(Document::$taxCalculationMethodArray); ?> | ->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"; ?> | <?php $hintKeywordsPrefix = "Saisissez [ANNEE] pour intégrer l'année courante"; ?> | ||||
<?= $form->field($model, 'document_quotation_prefix')->hint($hintKeywordsPrefix); ?> | <?= $form->field($model, 'document_quotation_prefix')->hint($hintKeywordsPrefix); ?> | ||||
<?= $form->field($model, 'document_quotation_first_reference'); ?> | <?= $form->field($model, 'document_quotation_first_reference'); ?> |
const ALIAS_SETTINGS = 'settings'; | const ALIAS_SETTINGS = 'settings'; | ||||
const ALIAS_SHOP_SUPPORT = 'shop_support'; | const ALIAS_SHOP_SUPPORT = 'shop_support'; | ||||
const ALIAS_SHARED_POINT_SALE = 'shared_point_sale'; | 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_SPONSORSHIP = 'sponsorship'; | ||||
const ALIAS_BRIDGE_EVOLIZ = 'bridge_evoliz'; | |||||
/** | /** | ||||
* @inheritdoc | * @inheritdoc |
Feature::ALIAS_SETTINGS => 'Système de paramètres', | Feature::ALIAS_SETTINGS => 'Système de paramètres', | ||||
Feature::ALIAS_SHOP_SUPPORT => 'Support boutique', | Feature::ALIAS_SHOP_SUPPORT => 'Support boutique', | ||||
Feature::ALIAS_SHARED_POINT_SALE => 'Points de vente partagés', | 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" | |||||
]; | ]; | ||||
} | } | ||||
} | } |
</div> | </div> | ||||
<div class="row"> | <div class="row"> | ||||
<?= block_feature("graph-up", "Statistiques et rapports de vente"); ?> | <?= 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> | </div> | ||||
</div> | </div> |