瀏覽代碼

[Administration] Documents : pouvoir ajouter des informations supplémentaires en dessous de l'adresse #1155

feature/souke
Guillaume Bourgeois 1 年之前
父節點
當前提交
a0b6fb5c3e
共有 5 個文件被更改,包括 43 次插入6 次删除
  1. +8
    -1
      backend/views/document/download.php
  2. +7
    -4
      backend/views/producer/update.php
  3. +0
    -1
      common/logic/Document/Document/Service/DocumentUtils.php
  4. +2
    -0
      common/logic/Producer/Producer/Model/Producer.php
  5. +26
    -0
      console/migrations/m230829_081058_add_column_producer_option_document_infos_top.php

+ 8
- 1
backend/views/document/download.php 查看文件

@@ -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): ?>

+ 7
- 4
backend/views/producer/update.php 查看文件

@@ -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>


+ 0
- 1
common/logic/Document/Document/Service/DocumentUtils.php 查看文件

@@ -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);
}
}

+ 2
- 0
common/logic/Producer/Producer/Model/Producer.php 查看文件

@@ -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',

+ 26
- 0
console/migrations/m230829_081058_add_column_producer_option_document_infos_top.php 查看文件

@@ -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');
}
}

Loading…
取消
儲存