@@ -24,7 +24,14 @@ $documentPriceDecimals = (int) $producerManager->getConfig('option_document_pric | |||
<img style="max-height: 80px;" src="<?= $producerManager->getUrlLogo($producer) ?>"/> | |||
</div> | |||
<?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 class="user"> | |||
<?php if ($document->address && strlen($document->address) > 0): ?> |
@@ -464,14 +464,17 @@ $this->addBreadcrumb($this->getTitle()); | |||
2 => '2', | |||
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') | |||
->textarea(['rows' => 15]) ?> | |||
->textarea(['rows' => 8]) ?> | |||
<?= $form->field($model, 'document_infos_quotation') | |||
->textarea(['rows' => 15]) ?> | |||
->textarea(['rows' => 8]) ?> | |||
<?= $form->field($model, 'document_infos_invoice') | |||
->textarea(['rows' => 15]) ?> | |||
->textarea(['rows' => 8]) ?> | |||
<?= $form->field($model, 'document_infos_delivery_note') | |||
->textarea(['rows' => 15]) ?> | |||
->textarea(['rows' => 8]) ?> | |||
</div> | |||
</div> | |||
@@ -81,7 +81,6 @@ class DocumentUtils extends AbstractService implements UtilsInterface | |||
$aliasDirectoryBase = $this->documentSolver->getAliasDirectoryBase($document); | |||
$directoryPdf = \Yii::getAlias($aliasDirectoryBase); | |||
if (!file_exists($directoryPdf)) { | |||
//die('dir : '.$directoryPdf); | |||
mkdir($directoryPdf, 0755); | |||
} | |||
} |
@@ -201,6 +201,7 @@ class Producer extends ActiveRecordCommon | |||
'tiller_provider_token', | |||
'tiller_restaurant_token', | |||
'status', | |||
'document_infos_top', | |||
'document_infos_bottom', | |||
'document_infos_quotation', | |||
'document_infos_invoice', | |||
@@ -368,6 +369,7 @@ class Producer extends ActiveRecordCommon | |||
'document_invoice_first_reference' => 'Première référence des factures', | |||
'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_infos_top' => 'Informations affichées en haut des documents', | |||
'document_infos_bottom' => 'Informations affichées en bas des documents', | |||
'document_infos_quotation' => 'Informations affichées en bas des devis', | |||
'document_infos_invoice' => 'Informations affichées en bas des factures', |
@@ -0,0 +1,26 @@ | |||
<?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'); | |||
} | |||
} |