@@ -21,7 +21,8 @@ $documentPriceDecimals = (int) $producerModule->getConfig('option_document_price | |||
<div class="producer"> | |||
<?php if (strlen($producer->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> | |||
<?php endif; ?> | |||
<div class="address"> |
@@ -66,7 +66,7 @@ $userCurrent = GlobalParam::getCurrentUser(); | |||
<?php if($producer->logo): ?> | |||
<span class="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) ?>" /> | |||
</span> | |||
<?php endif; ?> |
@@ -467,6 +467,15 @@ $this->addBreadcrumb($this->getTitle()); | |||
0 => 'Non', | |||
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([ | |||
0 => 'Non', | |||
1 => 'Oui' |
@@ -164,7 +164,8 @@ class Producer extends ActiveRecordCommon | |||
'option_billing_reduction_percentage', | |||
'dolibarr_socid', | |||
'dolibarr_product_id', | |||
'option_weeks_distributions_activated_in_advance' | |||
'option_weeks_distributions_activated_in_advance', | |||
'option_document_height_logo', | |||
], | |||
'integer' | |||
], | |||
@@ -446,7 +447,8 @@ class Producer extends ActiveRecordCommon | |||
'dolibarr_socid' => 'Dolibarr : id user', | |||
'dolibarr_product_id' => 'Dolibarr : id produit', | |||
'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' | |||
]; | |||
} | |||
@@ -0,0 +1,26 @@ | |||
<?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'); | |||
} | |||
} |