Browse Source

[Administration] Distribution > étiquettes : ajustements #1343

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
658b491c89
10 changed files with 148 additions and 132 deletions
  1. +9
    -6
      backend/views/distribution/shopping-cart-labels.php
  2. +17
    -2
      backend/views/point-sale/_form.php
  3. +29
    -115
      backend/views/producer/update.php
  4. +13
    -4
      backend/views/user/_form.php
  5. +35
    -0
      common/helpers/Dropdown.php
  6. +4
    -0
      common/logic/Distribution/Distribution/Export/DistributionShoppingCartLabelsPdfGenerator.php
  7. +3
    -2
      common/logic/PointSale/PointSale/Model/PointSale.php
  8. +3
    -1
      common/logic/Producer/Producer/Model/Producer.php
  9. +5
    -2
      common/logic/User/User/Model/User.php
  10. +30
    -0
      console/migrations/m231025_064432_add_columns_shopping_cart_labels.php

+ 9
- 6
backend/views/distribution/shopping-cart-labels.php View File

use yii\helpers\Html; use yii\helpers\Html;


$orderModule = OrderModule::getInstance(); $orderModule = OrderModule::getInstance();
$index = 1;
$shoppingCartLabelsByColumn = 8;
$index = 0;


?> ?>
<?php <?php
$i = 0; $i = 0;
foreach($ordersArray as $key => $order): ?>
<div class="shopping-cart-label shopping-cart-label-<?= $index ?>">
foreach($ordersArray as $key => $order):
$index ++;
?>
<div class="shopping-cart-label">
<div class="inner"> <div class="inner">
<div class="username"> <div class="username">
<?= $orderModule->getOrderUsername($order); ?> <?= $orderModule->getOrderUsername($order); ?>
</div> </div>
</div> </div>
</div> </div>
<?php $index = ($index == $shoppingCartLabelsByColumn) ? 1 : $index + 1; ?>
<?php if($index == 1 && $key !== array_key_last($ordersArray)): ?>
<?php if($index == $shoppingCartLabelsPerColumn) {
$index = 0;
} ?>
<?php if($index == 0 && $key !== array_key_last($ordersArray)): ?>
<columnbreak /> <columnbreak />
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>

+ 17
- 2
backend/views/point-sale/_form.php View File

* termes. * termes.
*/ */


use common\logic\Distribution\Distribution\Module\DistributionModule;
use common\logic\Distribution\Distribution\Service\ExportManager;
use common\logic\Producer\Producer\Module\ProducerModule;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
use common\logic\Producer\Producer\Model\Producer; use common\logic\Producer\Producer\Model\Producer;
use common\logic\User\User\Module\UserModule; use common\logic\User\User\Module\UserModule;


$producerModule = $this->getProducerModule();
$userModule = $this->getUserModule();
$producerModule = ProducerModule::getInstance();
$userModule = UserModule::getInstance();
$distributionModule = DistributionModule::getInstance();


?> ?>


<?= $form->field($model, 'button_generate_delivery_note_each_user')->checkbox() ?> <?= $form->field($model, 'button_generate_delivery_note_each_user')->checkbox() ?>
</div> </div>
</div> </div>

<?php if($distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Exports</h3>
</div>
<div class="panel-body">
<?= $form->field($model, 'exclude_export_shopping_cart_labels')->checkbox(); ?>
</div>
</div>
<?php endif; ?>
</div> </div>
<div class="clr"></div> <div class="clr"></div>



+ 29
- 115
backend/views/producer/update.php View File

* termes. * termes.
*/ */


use common\helpers\Dropdown;
use common\helpers\GlobalParam; use common\helpers\GlobalParam;
use common\logic\Distribution\Distribution\Module\DistributionModule; use common\logic\Distribution\Distribution\Module\DistributionModule;
use common\logic\Distribution\Distribution\Service\ExportManager;
use common\logic\User\User\Module\UserModule; use common\logic\User\User\Module\UserModule;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;


\backend\assets\VuejsProducerUpdateAsset::register($this); \backend\assets\VuejsProducerUpdateAsset::register($this);

$userModule = UserModule::getInstance(); $userModule = UserModule::getInstance();
$userCurrent = GlobalParam::getCurrentUser(); $userCurrent = GlobalParam::getCurrentUser();
$distributionExportManager = DistributionModule::getInstance()->getExportManager(); $distributionExportManager = DistributionModule::getInstance()->getExportManager();
<div class="panel-body"> <div class="panel-body">
<h4>Accès</h4> <h4>Accès</h4>
<?= $form->field($model, 'active') <?= $form->field($model, 'active')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], [])
->dropDownList(Dropdown::noYesChoices())
->label('En ligne') ->label('En ligne')
->hint('Activez cette option pour rendre votre espace visible à vos clients.'); ?> ->hint('Activez cette option pour rendre votre espace visible à vos clients.'); ?>
<?= $form->field($model, 'code')->hint("Saisissez ce champs si vous souhaitez protéger l'accès à votre espace par un code, sinon laissez-le vide.<br />" <?= $form->field($model, 'code')->hint("Saisissez ce champs si vous souhaitez protéger l'accès à votre espace par un code, sinon laissez-le vide.<br />"
<div class="panel-body"> <div class="panel-body">
<h4>Tableau de bord administration</h4> <h4>Tableau de bord administration</h4>
<?= $form->field($model, 'option_dashboard_number_distributions') <?= $form->field($model, 'option_dashboard_number_distributions')
->dropDownList([
3 => '3',
6 => '6',
9 => '9',
12 => '12',
15 => '15',
18 => '18',
21 => '21',
24 => '24',
27 => '27',
30 => '30',
], []); ?>
->dropDownList(Dropdown::numberChoices(3, 30, false, '', 3)); ?>


<?= $form->field($model, 'option_dashboard_date_start')->textInput([ <?= $form->field($model, 'option_dashboard_date_start')->textInput([
'class' => 'datepicker form-control' 'class' => 'datepicker form-control'
Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST => 'Liste', Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST => 'Liste',
]); ?> ]); ?>
<?= $form->field($model, 'option_delivery') <?= $form->field($model, 'option_delivery')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?php echo $form->field($model, 'option_allow_order_guest') <?php echo $form->field($model, 'option_allow_order_guest')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>

->dropDownList(Dropdown::noYesChoices()); ?>


<h4>Notifications</h4> <h4>Notifications</h4>
<?= $form->field($model, 'option_notify_producer_order_summary') <?= $form->field($model, 'option_notify_producer_order_summary')
->dropDownList([
0 => 'Non',
1 => 'Oui',
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_email_confirm') <?= $form->field($model, 'option_email_confirm')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_email_confirm_producer') <?= $form->field($model, 'option_email_confirm_producer')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>


<h4>Divers</h4> <h4>Divers</h4>
<?php <?php
',' => 'Virgule (,)' ',' => 'Virgule (,)'
], []); ?> ], []); ?>
<?= $form->field($model, 'option_export_display_product_reference') <?= $form->field($model, 'option_export_display_product_reference')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_export_display_column_delivery_note') <?= $form->field($model, 'option_export_display_column_delivery_note')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_csv_export_all_products') <?= $form->field($model, 'option_csv_export_all_products')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_csv_export_by_piece') <?= $form->field($model, 'option_csv_export_by_piece')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'export_shopping_cart_labels_number_per_column')
->dropDownList(Dropdown::numberChoices(1, 20)); ?>
</div> </div>
</div> </div>


<div class="panel-body"> <div class="panel-body">
<h4>Abonnements</h4> <h4>Abonnements</h4>
<?= $form->field($model, 'user_manage_subscription') <?= $form->field($model, 'user_manage_subscription')
->dropDownList([
0 => 'Non',
1 => 'Oui',
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
</div> </div>
</div> </div>


<div class="panel-body"> <div class="panel-body">
<h4>Crédit</h4> <h4>Crédit</h4>
<?= $form->field($model, 'credit') <?= $form->field($model, 'credit')
->dropDownList([
0 => 'Non',
1 => 'Oui',
], [])
->dropDownList(Dropdown::noYesChoices())
->label('Activer le système de Crédit') ->label('Activer le système de Crédit')
->hint('Le système de Crédit permet à vos clients d\'avoir un compte prépayé sur le site <em>distrib</em>.<br />' ->hint('Le système de Crédit permet à vos clients d\'avoir un compte prépayé sur le site <em>distrib</em>.<br />'
. 'Ils créditent leur compte en vous donnant la somme de leur choix et c\'est ensuite à vous de ' . Html::a('mettre à jour', ['user/index']) . ' leur Crédit en ligne.<br />' . 'Ils créditent leur compte en vous donnant la somme de leur choix et c\'est ensuite à vous de ' . Html::a('mettre à jour', ['user/index']) . ' leur Crédit en ligne.<br />'
], [])->hint(Producer::HINT_CREDIT_FUNCTIONING); ?> ], [])->hint(Producer::HINT_CREDIT_FUNCTIONING); ?>


<?= $form->field($model, 'use_credit_checked_default') <?= $form->field($model, 'use_credit_checked_default')
->dropDownList([
0 => 'Non',
1 => 'Oui',
], [])->hint('Utilisation optionnelle du Crédit.'); ?>
->dropDownList(Dropdown::noYesChoices())
->hint('Utilisation optionnelle du Crédit.'); ?>


<?= $form->field($model, 'credit_limit_reminder', [ <?= $form->field($model, 'credit_limit_reminder', [
'template' => '{label}<div class="input-group">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}', 'template' => '{label}<div class="input-group">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}',
]) ])
->hint("Une relance est envoyé au client dès que ce seuil est dépassé."); ?> ->hint("Une relance est envoyé au client dès que ce seuil est dépassé."); ?>




<?= $form->field($model, 'credit_limit', [ <?= $form->field($model, 'credit_limit', [
'template' => '{label}<div class="input-group">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}', 'template' => '{label}<div class="input-group">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}',
])->hint('Limite de crédit que l\'utilisateur ne pourra pas dépasser. Laisser vide pour permettre un crédit négatif et infini.'); ?> ])->hint('Limite de crédit que l\'utilisateur ne pourra pas dépasser. Laisser vide pour permettre un crédit négatif et infini.'); ?>


<h4>Paiement en ligne</h4> <h4>Paiement en ligne</h4>

<?= $form->field($model, 'online_payment') <?= $form->field($model, 'online_payment')
->dropDownList([
0 => 'Non',
1 => 'Oui',
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_online_payment_minimum_amount') <?= $form->field($model, 'option_online_payment_minimum_amount')
->hint('Valeur par défaut si non défini : '.Producer::ONLINE_PAYMENT_MINIMUM_AMOUNT_DEFAULT.' €') ->hint('Valeur par défaut si non défini : '.Producer::ONLINE_PAYMENT_MINIMUM_AMOUNT_DEFAULT.' €')
->textInput(); ?> ->textInput(); ?>
<?= $form->field($model, 'option_stripe_mode_test')->dropDownList([
0 => 'Non',
1 => 'Oui'
], []); ?>

<?= $form->field($model, 'option_stripe_mode_test')->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_online_payment_type') <?= $form->field($model, 'option_online_payment_type')
->dropDownList([ ->dropDownList([
'credit' => 'Alimentation du crédit', 'credit' => 'Alimentation du crédit',
'order' => 'Paiement à la commande', 'order' => 'Paiement à la commande',
], []); ?> ], []); ?>

<?= $form->field($model, 'option_stripe_public_key')->textInput(); ?> <?= $form->field($model, 'option_stripe_public_key')->textInput(); ?>
<?= $form->field($model, 'option_stripe_private_key')->textInput(); ?> <?= $form->field($model, 'option_stripe_private_key')->textInput(); ?>
<?= $form->field($model, 'option_stripe_endpoint_secret')->textInput(); ?> <?= $form->field($model, 'option_stripe_endpoint_secret')->textInput(); ?>
<div class="panel-body"> <div class="panel-body">
<h4>Tiller</h4> <h4>Tiller</h4>
<?= $form->field($model, 'tiller') <?= $form->field($model, 'tiller')
->dropDownList([
0 => 'Non',
1 => 'Oui'
], [])
->dropDownList(Dropdown::noYesChoices())
->label('Synchroniser avec Tiller'); ?> ->label('Synchroniser avec Tiller'); ?>
<?= $form->field($model, 'tiller_provider_token'); ?> <?= $form->field($model, 'tiller_provider_token'); ?>
<?= $form->field($model, 'tiller_restaurant_token'); ?> <?= $form->field($model, 'tiller_restaurant_token'); ?>
->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([
0 => 'Non',
1 => 'Oui'
]); ?>
<?= $form->field($model, 'option_export_evoliz')->dropDownList(Dropdown::noYesChoices()); ?>
<?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'); ?>
1 => 'Oui' 1 => 'Oui'
]); ?> ]); ?>
<?= $form->field($model, 'option_document_height_logo') <?= $form->field($model, 'option_document_height_logo')
->dropDownList([
null => '--',
50 => '50px',
100 => '100px',
150 => '150px',
200 => '200px',
250 => '250px',
]); ?>
<?= $form->field($model, 'document_display_orders_invoice')->dropDownList([
0 => 'Non',
1 => 'Oui'
]); ?>
<?= $form->field($model, 'document_display_orders_delivery_note')->dropDownList([
0 => 'Non',
1 => 'Oui'
]); ?>
<?= $form->field($model, 'document_display_prices_delivery_note')->dropDownList([
0 => 'Non',
1 => 'Oui'
]); ?>
<?= $form->field($model, 'document_display_product_description')->dropDownList([
0 => 'Non',
1 => 'Oui'
]); ?>
->dropDownList(Dropdown::numberChoices(50, 250, true, 'px', 50)); ?>
<?= $form->field($model, 'document_display_orders_invoice')->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'document_display_orders_delivery_note')->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'document_display_prices_delivery_note')->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'document_display_product_description')->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_document_price_decimals')->dropDownList([ <?= $form->field($model, 'option_document_price_decimals')->dropDownList([
2 => '2', 2 => '2',
3 => '3' 3 => '3'
]) ])
->hint("Sélectionnez le temps que vous estimez gagner chaque semaine en utilisant ce logiciel. Cette donnée sera utilisée sur la page <a href=\"".$urlAboutPage."\" target=\"_blanck\">À propos</a> du site.") ; ?> ->hint("Sélectionnez le temps que vous estimez gagner chaque semaine en utilisant ce logiciel. Cette donnée sera utilisée sur la page <a href=\"".$urlAboutPage."\" target=\"_blanck\">À propos</a> du site.") ; ?>
<?= $form->field($model, 'option_display_message_new_opendistrib_version') <?= $form->field($model, 'option_display_message_new_opendistrib_version')
->dropDownList([
1 => 'Oui',
0 => 'Non'
], []); ?>
->dropDownList(Dropdown::noYesChoices()); ?>
</div> </div>
</div> </div>



+ 13
- 4
backend/views/user/_form.php View File

* termes. * termes.
*/ */


use common\logic\Distribution\Distribution\Module\DistributionModule;
use common\logic\Distribution\Distribution\Service\ExportManager;
use common\logic\Producer\Producer\Module\ProducerModule;
use common\logic\User\User\Module\UserModule;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;


\backend\assets\VuejsUserFormAsset::register($this); \backend\assets\VuejsUserFormAsset::register($this);


$userModule = $this->getUserModule();
$producerModule = $this->getProducerModule();
$userModule = UserModule::getInstance();
$producerModule = ProducerModule::getInstance();
$distributionModule = DistributionModule::getInstance();


?> ?>


<?= $form->field($model, 'name')->textInput() ?> <?= $form->field($model, 'name')->textInput() ?>
<?= $form->field($model, 'phone')->textInput() ?> <?= $form->field($model, 'phone')->textInput() ?>
<?= $form->field($model, 'email')->textInput() ?> <?= $form->field($model, 'email')->textInput() ?>
<?= $form->field($model, 'newsletter')->checkbox() ?>
<?= $form->field($model, 'address')->textarea() ?> <?= $form->field($model, 'address')->textarea() ?>


<?php if ($producerModule->getConfig('option_export_evoliz')): ?>
<?php if ($producerModule->getSolver()->getConfig('option_export_evoliz')): ?>
<?= $form->field($model, 'evoliz_code')->textInput() ?> <?= $form->field($model, 'evoliz_code')->textInput() ?>
<?php endif; ?> <?php endif; ?>
<?= $form->field($model, 'newsletter')->checkbox() ?>

<?php if($distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)): ?>
<?= $form->field($model, 'exclude_export_shopping_cart_labels')->checkbox(); ?>
<?php endif; ?>


<?php if($pointsSaleArray && count($pointsSaleArray) > 0): ?> <?php if($pointsSaleArray && count($pointsSaleArray) > 0): ?>
<?= $form->field($model, 'points_sale')->checkboxlist( <?= $form->field($model, 'points_sale')->checkboxlist(

+ 35
- 0
common/helpers/Dropdown.php View File

<?php

namespace common\helpers;

class Dropdown
{
public static function noYesChoices(): array
{
return [
0 => 'Non',
1 => 'Oui'
];
}

public static function numberChoices(
int $start,
int $end,
bool $addNullValue = true,
string $appendToValues = '',
int $increment = 1
): array
{
$choicesArray = [];

if($addNullValue) {
$choicesArray[null] = '--';
}

for($i = $start; $i <= $end; $i += $increment) {
$choicesArray[$i] = $i.$appendToValues;
}

return $choicesArray;
}
}

+ 4
- 0
common/logic/Distribution/Distribution/Export/DistributionShoppingCartLabelsPdfGenerator.php View File

use common\logic\AbstractGenerator; use common\logic\AbstractGenerator;
use common\logic\Distribution\Distribution\Model\Distribution; use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Order\Order\Repository\OrderRepository; use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Producer\Producer\Service\ProducerSolver;
use kartik\mpdf\Pdf; use kartik\mpdf\Pdf;


class DistributionShoppingCartLabelsPdfGenerator extends AbstractGenerator implements DistributionExportGeneratorInterface class DistributionShoppingCartLabelsPdfGenerator extends AbstractGenerator implements DistributionExportGeneratorInterface
{ {
protected ProducerSolver $producerSolver;
protected OrderRepository $orderRepository; protected OrderRepository $orderRepository;


public function loadDependencies(): void public function loadDependencies(): void
{ {
$this->producerSolver = $this->loadService(ProducerSolver::class);
$this->orderRepository = $this->loadService(OrderRepository::class); $this->orderRepository = $this->loadService(OrderRepository::class);
} }


$content = \Yii::$app->getView()->render('@backend/views/distribution/shopping-cart-labels.php', [ $content = \Yii::$app->getView()->render('@backend/views/distribution/shopping-cart-labels.php', [
'distribution' => $distribution, 'distribution' => $distribution,
'ordersArray' => $ordersArray, 'ordersArray' => $ordersArray,
'shoppingCartLabelsPerColumn' => $this->producerSolver->getConfig('export_shopping_cart_labels_number_per_column') ?: 8
]); ]);


$pdf = new Pdf([ $pdf = new Pdf([

+ 3
- 2
common/logic/PointSale/PointSale/Model/PointSale.php View File

[['point_production', 'credit', 'delivery_monday', 'delivery_tuesday', [['point_production', 'credit', 'delivery_monday', 'delivery_tuesday',
'delivery_wednesday', 'delivery_thursday', 'delivery_friday', 'delivery_wednesday', 'delivery_thursday', 'delivery_friday',
'delivery_saturday', 'delivery_sunday', 'default', 'is_bread_box', 'delivery_saturday', 'delivery_sunday', 'default', 'is_bread_box',
'button_generate_delivery_note_point_sale', 'button_generate_delivery_note_each_user'], 'boolean'],
'button_generate_delivery_note_point_sale', 'button_generate_delivery_note_each_user', 'exclude_export_shopping_cart_labels'], 'boolean'],
['point_production', 'default', 'value' => 0], ['point_production', 'default', 'value' => 0],
[['id_producer', 'id_user', 'maximum_number_orders', 'status'], 'integer'], [['id_producer', 'id_user', 'maximum_number_orders', 'status'], 'integer'],
['id_producer', 'required'], ['id_producer', 'required'],
'bread_box_code' => 'Code boîte à pain', 'bread_box_code' => 'Code boîte à pain',
'status' => 'Statut', 'status' => 'Statut',
'button_generate_delivery_note_point_sale' => 'Activer le bouton de génération de bon de livraison par point de vente', 'button_generate_delivery_note_point_sale' => 'Activer le bouton de génération de bon de livraison par point de vente',
'button_generate_delivery_note_each_user' => 'Activer le bouton de génération de bon de livraison par client'
'button_generate_delivery_note_each_user' => 'Activer le bouton de génération de bon de livraison par client',
'exclude_export_shopping_cart_labels' => "Exclure de l'export d'étiquettes",
]; ];
} }



+ 3
- 1
common/logic/Producer/Producer/Model/Producer.php View File

'dolibarr_product_id', 'dolibarr_product_id',
'option_weeks_distributions_activated_in_advance', 'option_weeks_distributions_activated_in_advance',
'option_document_height_logo', 'option_document_height_logo',
'export_shopping_cart_labels_number_per_column'
], ],
'integer' 'integer'
], ],
'dolibarr_product_id' => 'Dolibarr : id produit', 'dolibarr_product_id' => 'Dolibarr : id produit',
'option_weeks_distributions_activated_in_advance' => "Semaines de distributions à activer à l'avance", 'option_weeks_distributions_activated_in_advance' => "Semaines de distributions à activer à l'avance",
'option_invoice_only_based_on_delivery_notes' => 'Facturer uniquement sur la base des bons de livraison', 'option_invoice_only_based_on_delivery_notes' => 'Facturer uniquement sur la base des bons de livraison',
'option_document_height_logo' => 'Hauteur du logo dans les documents'
'option_document_height_logo' => 'Hauteur du logo dans les documents',
'export_shopping_cart_labels_number_per_column' => "Étiquettes (PDF) : nombre d'étiquettes par colonne",
]; ];
} }



+ 5
- 2
common/logic/User/User/Model/User.php View File

public function rules() public function rules()
{ {
return [ return [
[['no_mail', 'mail_distribution_monday', 'mail_distribution_tuesday', 'mail_distribution_wednesday', 'mail_distribution_thursday', 'mail_distribution_friday', 'mail_distribution_saturday', 'mail_distribution_sunday', 'is_main_contact', 'newsletter'], 'boolean'],
[['no_mail', 'mail_distribution_monday', 'mail_distribution_tuesday', 'mail_distribution_wednesday',
'mail_distribution_thursday', 'mail_distribution_friday', 'mail_distribution_saturday',
'mail_distribution_sunday', 'is_main_contact', 'newsletter', 'exclude_export_shopping_cart_labels'], 'boolean'],
[['lastname', 'name', 'phone', 'address', 'type', 'name_legal_person', 'evoliz_code'], 'string'], [['lastname', 'name', 'phone', 'address', 'type', 'name_legal_person', 'evoliz_code'], 'string'],
['lastname', 'verifyOneName', 'skipOnError' => false, 'skipOnEmpty' => false], ['lastname', 'verifyOneName', 'skipOnError' => false, 'skipOnEmpty' => false],
['email', 'email', 'message' => 'Cette adresse email n\'est pas valide'], ['email', 'email', 'message' => 'Cette adresse email n\'est pas valide'],
'product_price_percent' => 'Prix produits : pourcentage', 'product_price_percent' => 'Prix produits : pourcentage',
'user_groups' => "Groupes d'utilisateurs", 'user_groups' => "Groupes d'utilisateurs",
'evoliz_code' => 'Code client Evoliz', 'evoliz_code' => 'Code client Evoliz',
'newsletter' => "Inscrit au bulletin d'information"
'newsletter' => "Inscrit au bulletin d'information",
'exclude_export_shopping_cart_labels' => "Exclure de l'export d'étiquettes",
]; ];
} }



+ 30
- 0
console/migrations/m231025_064432_add_columns_shopping_cart_labels.php View File

<?php

use yii\db\Migration;
use yii\db\Schema;

/**
* Class m231025_064432_add_columns_shopping_cart_labels
*/
class m231025_064432_add_columns_shopping_cart_labels extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('point_sale','exclude_export_shopping_cart_labels', Schema::TYPE_BOOLEAN);
$this->addColumn('user','exclude_export_shopping_cart_labels', Schema::TYPE_BOOLEAN);
$this->addColumn('producer','export_shopping_cart_labels_number_per_column', Schema::TYPE_INTEGER);
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('point_sale','exclude_export_shopping_cart_labels');
$this->dropColumn('user','exclude_export_shopping_cart_labels');
$this->dropColumn('producer','export_shopping_cart_labels_number_per_column');
}
}

Loading…
Cancel
Save