<img style="max-height: 80px;" src="<?= $producerManager->getUrlLogo($producer) ?>"/> | <img style="max-height: 80px;" src="<?= $producerManager->getUrlLogo($producer) ?>"/> | ||||
</div> | </div> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<div class="address"><?= $producerManager->getFullAddress($producer, true); ?></div> | |||||
<div class="address"> | |||||
<?= $producerManager->getFullAddress($producer, true); ?> | |||||
</div> | |||||
<?php if (strlen($producer->document_infos_top)): ?> | |||||
<div class="infos-top"> | |||||
<?= nl2br(Html::encode($producer->document_infos_top)) ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
</div> | </div> | ||||
<div class="user"> | <div class="user"> | ||||
<?php if ($document->address && strlen($document->address) > 0): ?> | <?php if ($document->address && strlen($document->address) > 0): ?> |
2 => '2', | 2 => '2', | ||||
3 => '3' | 3 => '3' | ||||
]); ?> | ]); ?> | ||||
<?= $form->field($model, 'document_infos_top') | |||||
->textarea(['rows' => 8]) | |||||
->hint("Affichées juste en dessous de l'adresse"); ?> | |||||
<?= $form->field($model, 'document_infos_bottom') | <?= $form->field($model, 'document_infos_bottom') | ||||
->textarea(['rows' => 15]) ?> | |||||
->textarea(['rows' => 8]) ?> | |||||
<?= $form->field($model, 'document_infos_quotation') | <?= $form->field($model, 'document_infos_quotation') | ||||
->textarea(['rows' => 15]) ?> | |||||
->textarea(['rows' => 8]) ?> | |||||
<?= $form->field($model, 'document_infos_invoice') | <?= $form->field($model, 'document_infos_invoice') | ||||
->textarea(['rows' => 15]) ?> | |||||
->textarea(['rows' => 8]) ?> | |||||
<?= $form->field($model, 'document_infos_delivery_note') | <?= $form->field($model, 'document_infos_delivery_note') | ||||
->textarea(['rows' => 15]) ?> | |||||
->textarea(['rows' => 8]) ?> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
$aliasDirectoryBase = $this->documentSolver->getAliasDirectoryBase($document); | $aliasDirectoryBase = $this->documentSolver->getAliasDirectoryBase($document); | ||||
$directoryPdf = \Yii::getAlias($aliasDirectoryBase); | $directoryPdf = \Yii::getAlias($aliasDirectoryBase); | ||||
if (!file_exists($directoryPdf)) { | if (!file_exists($directoryPdf)) { | ||||
//die('dir : '.$directoryPdf); | |||||
mkdir($directoryPdf, 0755); | mkdir($directoryPdf, 0755); | ||||
} | } | ||||
} | } |
'tiller_provider_token', | 'tiller_provider_token', | ||||
'tiller_restaurant_token', | 'tiller_restaurant_token', | ||||
'status', | 'status', | ||||
'document_infos_top', | |||||
'document_infos_bottom', | 'document_infos_bottom', | ||||
'document_infos_quotation', | 'document_infos_quotation', | ||||
'document_infos_invoice', | 'document_infos_invoice', | ||||
'document_invoice_first_reference' => 'Première référence des factures', | 'document_invoice_first_reference' => 'Première référence des factures', | ||||
'document_delivery_note_prefix' => 'Préfixe des bons de livraison', | 'document_delivery_note_prefix' => 'Préfixe des bons de livraison', | ||||
'document_delivery_note_first_reference' => 'Première référence des bons de livraison', | 'document_delivery_note_first_reference' => 'Première référence des bons de livraison', | ||||
'document_infos_top' => 'Informations affichées en haut des documents', | |||||
'document_infos_bottom' => 'Informations affichées en bas des documents', | 'document_infos_bottom' => 'Informations affichées en bas des documents', | ||||
'document_infos_quotation' => 'Informations affichées en bas des devis', | 'document_infos_quotation' => 'Informations affichées en bas des devis', | ||||
'document_infos_invoice' => 'Informations affichées en bas des factures', | 'document_infos_invoice' => 'Informations affichées en bas des factures', |
<?php | |||||
use yii\db\Migration; | |||||
use yii\db\Schema; | |||||
/** | |||||
* Class m230829_081058_add_column_producer_option_document_infos_top | |||||
*/ | |||||
class m230829_081058_add_column_producer_option_document_infos_top extends Migration | |||||
{ | |||||
/** | |||||
* {@inheritdoc} | |||||
*/ | |||||
public function safeUp() | |||||
{ | |||||
$this->addColumn('producer', 'document_infos_top', Schema::TYPE_TEXT) ; | |||||
} | |||||
/** | |||||
* {@inheritdoc} | |||||
*/ | |||||
public function safeDown() | |||||
{ | |||||
$this->dropColumn('producer', 'document_infos_top'); | |||||
} | |||||
} |