<div class="producer"> | <div class="producer"> | ||||
<?php if (strlen($producer->logo)) : ?> | <?php if (strlen($producer->logo)) : ?> | ||||
<div class="logo"> | <div class="logo"> | ||||
<img style="max-height: 80px;" src="<?= $producerModule->getUrlLogo($producer) ?>"/> | |||||
<?php $optionDocumentHeightLogo = $producerModule->getSolver()->getConfig('option_document_height_logo'); ?> | |||||
<img style="height: <?= $optionDocumentHeightLogo ?: 100; ?>px;" src="<?= $producerModule->getUrlLogo($producer) ?>"/> | |||||
</div> | </div> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<div class="address"> | <div class="address"> |
<?php if($producer->logo): ?> | <?php if($producer->logo): ?> | ||||
<span class="logo"> | <span class="logo"> | ||||
<img class="img-logo" | <img class="img-logo" | ||||
src="<?= Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl; ?>uploads/<?= $producer->logo; ?>" | |||||
src="<?= Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl; ?>/uploads/<?= $producer->logo; ?>" | |||||
alt="Logo <?= Html::encode($producer->name) ?>" /> | alt="Logo <?= Html::encode($producer->name) ?>" /> | ||||
</span> | </span> | ||||
<?php endif; ?> | <?php endif; ?> |
0 => 'Non', | 0 => 'Non', | ||||
1 => 'Oui' | 1 => 'Oui' | ||||
]); ?> | ]); ?> | ||||
<?= $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([ | <?= $form->field($model, 'document_display_orders_invoice')->dropDownList([ | ||||
0 => 'Non', | 0 => 'Non', | ||||
1 => 'Oui' | 1 => 'Oui' |
'option_billing_reduction_percentage', | 'option_billing_reduction_percentage', | ||||
'dolibarr_socid', | 'dolibarr_socid', | ||||
'dolibarr_product_id', | 'dolibarr_product_id', | ||||
'option_weeks_distributions_activated_in_advance' | |||||
'option_weeks_distributions_activated_in_advance', | |||||
'option_document_height_logo', | |||||
], | ], | ||||
'integer' | 'integer' | ||||
], | ], | ||||
'dolibarr_socid' => 'Dolibarr : id user', | 'dolibarr_socid' => 'Dolibarr : id user', | ||||
'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' | |||||
]; | ]; | ||||
} | } | ||||
<?php | |||||
use yii\db\Migration; | |||||
use yii\db\Schema; | |||||
/** | |||||
* Class m231024_092428_add_column_producer_option_document_height_logo | |||||
*/ | |||||
class m231024_092428_add_column_producer_option_document_height_logo extends Migration | |||||
{ | |||||
/** | |||||
* {@inheritdoc} | |||||
*/ | |||||
public function safeUp() | |||||
{ | |||||
$this->addColumn('producer', 'option_document_height_logo', Schema::TYPE_INTEGER); | |||||
} | |||||
/** | |||||
* {@inheritdoc} | |||||
*/ | |||||
public function safeDown() | |||||
{ | |||||
$this->dropColumn('producer', 'option_document_height_logo'); | |||||
} | |||||
} |