@@ -218,7 +218,8 @@ class Producer extends ActiveRecordCommon | |||
'option_online_payment_type', | |||
'option_tax_calculation_method', | |||
'latest_version_opendistrib', | |||
'option_csv_separator' | |||
'option_csv_separator', | |||
'option_point_sale_wording' | |||
], | |||
'string' | |||
], | |||
@@ -273,6 +274,7 @@ class Producer extends ActiveRecordCommon | |||
'document_delivery_note_first_reference', | |||
'option_billing_type', | |||
'option_billing_frequency', | |||
'option_point_sale_wording', | |||
], | |||
'string', | |||
'max' => 255 | |||
@@ -395,6 +397,7 @@ class Producer extends ActiveRecordCommon | |||
'option_billing_reduction_percentage' => 'Réduction : pourcentage', | |||
'option_billing_permanent_transfer' => 'Virement permanent', | |||
'option_billing_permanent_transfer_amount' => 'Virement permanent : montant', | |||
'option_point_sale_wording' => 'Libellé points de vente' | |||
]; | |||
} | |||
@@ -7,6 +7,7 @@ use common\logic\AbstractService; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
use common\logic\SolverInterface; | |||
use common\logic\User\User\Model\User; | |||
use yii\helpers\Html; | |||
class ProducerSolver extends AbstractService implements SolverInterface | |||
{ | |||
@@ -242,4 +243,13 @@ class ProducerSolver extends AbstractService implements SolverInterface | |||
{ | |||
return $producer->option_billing_frequency == Producer::BILLING_FREQUENCY_BIANNUAL; | |||
} | |||
public function getPointSaleWording(Producer $producer) | |||
{ | |||
if($producer->option_point_sale_wording && strlen($producer->option_point_sale_wording)) { | |||
return Html::encode($producer->option_point_sale_wording); | |||
} | |||
return 'Points de vente'; | |||
} | |||
} |
@@ -0,0 +1,26 @@ | |||
<?php | |||
use yii\db\Migration; | |||
use yii\db\Schema; | |||
/** | |||
* Class m230320_080836_producer_add_option_point_sale_wording | |||
*/ | |||
class m230320_080836_producer_add_option_point_sale_wording extends Migration | |||
{ | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function safeUp() | |||
{ | |||
$this->addColumn('producer', 'option_point_sale_wording', Schema::TYPE_STRING .' DEFAULT NULL'); | |||
} | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function safeDown() | |||
{ | |||
$this->dropColumn('producer', 'option_point_sale_wording'); | |||
} | |||
} |
@@ -38,7 +38,8 @@ termes. | |||
use common\helpers\GlobalParam; | |||
use yii\widgets\ActiveForm; | |||
use common\logic\Producer\Producer\Producer; | |||
$producerManager = $this->getProducerManager(); | |||
?> | |||
<div class="order-form"> | |||
@@ -105,7 +106,7 @@ use common\logic\Producer\Producer\Producer; | |||
<div class="clr"></div> | |||
<div id="block-points-sale"> | |||
<h3 id="step-point-sale"><span>Points de vente</span></h3> | |||
<h3 id="step-point-sale"><span><?= $producerManager->getPointSaleWording($producer); ?></span></h3> | |||
<?= | |||
$form->field($model, 'id_point_sale') | |||
->label('') |
@@ -43,6 +43,7 @@ use common\helpers\Price; | |||
$producer = $this->context->getProducer() ; | |||
$productManager = $this->getProductManager(); | |||
$producerManager = $this->getProducerManager(); | |||
$this->setTitle('Accueil'); | |||
$this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ; | |||
@@ -59,7 +60,7 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ; | |||
<section id="points-sale"> | |||
<h3><span>Points de vente</span></h3> | |||
<h3><span><?= $producerManager->getPointSaleWording($producer); ?></span></h3> | |||
<?= GridView::widget([ | |||
'dataProvider' => $dataProviderPointsSale, | |||
'summary' => '', |