<?php if($productOrder->unit == 'piece' && isset($productOrder->product->weight) && $productOrder->product->weight): ?> | <?php if($productOrder->unit == 'piece' && isset($productOrder->product->weight) && $productOrder->product->weight): ?> | ||||
<span class="weight"> / <?= $productOrder->product->weight ?> g</span> | <span class="weight"> / <?= $productOrder->product->weight ?> g</span> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<?php if(strlen($productOrder->product->description)): ?> | |||||
<?php if(strlen($productOrder->product->description) && $displayProductDescription): ?> | |||||
<br /><small><?= Html::encode($productOrder->product->description) ?></small> | <br /><small><?= Html::encode($productOrder->product->description) ?></small> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
</td> | </td> |
<?php | <?php | ||||
$displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$app->controller->getClass() == 'DeliveryNote' && Producer::getConfig('document_display_prices_delivery_note')) ; | $displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$app->controller->getClass() == 'DeliveryNote' && Producer::getConfig('document_display_prices_delivery_note')) ; | ||||
$displayProductDescription = Producer::getConfig('document_display_product_description'); | |||||
?> | ?> | ||||
'document' => $document, | 'document' => $document, | ||||
'productOrder' => $productOrder, | 'productOrder' => $productOrder, | ||||
'displayOrders' => true, | 'displayOrders' => true, | ||||
'displayPrices' => $displayPrices | |||||
'displayPrices' => $displayPrices, | |||||
'displayProductDescription' => $displayProductDescription | |||||
]) ?> | ]) ?> | ||||
<?php endforeach; ?> | <?php endforeach; ?> | ||||
<?php endforeach; ?> | <?php endforeach; ?> | ||||
<?= $this->render('_download_product_line', [ | <?= $this->render('_download_product_line', [ | ||||
'document' => $document, | 'document' => $document, | ||||
'productOrder' => $productOrder, | 'productOrder' => $productOrder, | ||||
'displayPrices' => $displayPrices | |||||
'displayPrices' => $displayPrices, | |||||
'displayProductDescription' => $displayProductDescription | |||||
]) ?> | ]) ?> | ||||
<?php endforeach; ?> | <?php endforeach; ?> | ||||
<?php endforeach; ?> | <?php endforeach; ?> |
0 => 'Non', | 0 => 'Non', | ||||
1 => 'Oui' | 1 => 'Oui' | ||||
]) ; ?> | ]) ; ?> | ||||
<?= $form->field($model, 'document_display_product_description')->dropDownList([ | |||||
0 => 'Non', | |||||
1 => 'Oui' | |||||
]) ; ?> | |||||
<?= $form->field($model, 'document_infos_bottom') | <?= $form->field($model, 'document_infos_bottom') | ||||
->textarea(['rows' => 15]) ?> | ->textarea(['rows' => 15]) ?> | ||||
<?= $form->field($model, 'document_infos_quotation') | <?= $form->field($model, 'document_infos_quotation') |
/* line 14, ../../sass/document/download.scss */ | /* line 14, ../../sass/document/download.scss */ | ||||
.document-download #block-addresses .producer { | .document-download #block-addresses .producer { | ||||
text-align: left; | text-align: left; | ||||
margin-bottom: 20px; | |||||
margin-bottom: 5px; | |||||
} | } | ||||
/* line 19, ../../sass/document/download.scss */ | |||||
/* line 18, ../../sass/document/download.scss */ | |||||
.document-download #block-addresses .producer .logo { | .document-download #block-addresses .producer .logo { | ||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
} | } | ||||
/* line 27, ../../sass/document/download.scss */ | |||||
/* line 26, ../../sass/document/download.scss */ | |||||
.document-download #block-addresses .user { | .document-download #block-addresses .user { | ||||
text-align: right; | text-align: right; | ||||
} | } | ||||
/* line 32, ../../sass/document/download.scss */ | |||||
/* line 31, ../../sass/document/download.scss */ | |||||
.document-download #block-infos-document { | .document-download #block-infos-document { | ||||
padding-top: 30px; | |||||
padding-top: 15px; | |||||
} | } | ||||
/* line 35, ../../sass/document/download.scss */ | |||||
/* line 34, ../../sass/document/download.scss */ | |||||
.document-download #block-infos-document .date { | .document-download #block-infos-document .date { | ||||
padding-bottom: 10px; | padding-bottom: 10px; | ||||
} | } | ||||
/* line 38, ../../sass/document/download.scss */ | |||||
/* line 37, ../../sass/document/download.scss */ | |||||
.document-download #block-infos-document .reference { | .document-download #block-infos-document .reference { | ||||
padding-bottom: 10px; | padding-bottom: 10px; | ||||
font-size: 15px; | font-size: 15px; | ||||
font-weight: bold; | font-weight: bold; | ||||
} | } | ||||
/* line 43, ../../sass/document/download.scss */ | |||||
/* line 42, ../../sass/document/download.scss */ | |||||
.document-download #block-infos-document .reference .block-is-draft { | .document-download #block-infos-document .reference .block-is-draft { | ||||
border: solid 2px black; | border: solid 2px black; | ||||
padding: 10px; | padding: 10px; | ||||
text-transform: uppercase; | text-transform: uppercase; | ||||
} | } | ||||
/* line 54, ../../sass/document/download.scss */ | |||||
/* line 53, ../../sass/document/download.scss */ | |||||
.document-download #block-no-product { | .document-download #block-no-product { | ||||
font-weight: bold; | font-weight: bold; | ||||
border: solid 2px black; | border: solid 2px black; | ||||
text-transform: uppercase; | text-transform: uppercase; | ||||
padding: 10px; | padding: 10px; | ||||
} | } | ||||
/* line 61, ../../sass/document/download.scss */ | |||||
/* line 60, ../../sass/document/download.scss */ | |||||
.document-download #block-products { | .document-download #block-products { | ||||
padding-top: 20px; | padding-top: 20px; | ||||
} | } | ||||
/* line 64, ../../sass/document/download.scss */ | |||||
/* line 63, ../../sass/document/download.scss */ | |||||
.document-download #block-products table { | .document-download #block-products table { | ||||
width: 100%; | width: 100%; | ||||
padding: 0px; | padding: 0px; | ||||
border-right: solid 1px #c0c0c0; | border-right: solid 1px #c0c0c0; | ||||
border-collapse: collapse; | border-collapse: collapse; | ||||
} | } | ||||
/* line 72, ../../sass/document/download.scss */ | |||||
/* line 71, ../../sass/document/download.scss */ | |||||
.document-download #block-products table td, .document-download #block-products table th { | .document-download #block-products table td, .document-download #block-products table th { | ||||
padding: 5px; | padding: 5px; | ||||
border-top: solid 1px #c0c0c0; | border-top: solid 1px #c0c0c0; | ||||
border-left: solid 1px #c0c0c0; | border-left: solid 1px #c0c0c0; | ||||
font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; | font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; | ||||
font-size: 13px; | |||||
} | } | ||||
/* line 78, ../../sass/document/download.scss */ | /* line 78, ../../sass/document/download.scss */ | ||||
.document-download #block-products table td.align-left, .document-download #block-products table th.align-left { | .document-download #block-products table td.align-left, .document-download #block-products table th.align-left { |
#block-addresses { | #block-addresses { | ||||
.producer { | .producer { | ||||
text-align: left ; | text-align: left ; | ||||
margin-bottom: 20px ; | |||||
margin-bottom: 5px ; | |||||
.logo { | .logo { | ||||
margin-bottom: 20px ; | margin-bottom: 20px ; | ||||
} | } | ||||
#block-infos-document { | #block-infos-document { | ||||
padding-top: 30px ; | |||||
padding-top: 15px ; | |||||
.date { | .date { | ||||
padding-bottom: 10px ; | padding-bottom: 10px ; | ||||
border-top: solid 1px $border-color ; | border-top: solid 1px $border-color ; | ||||
border-left: solid 1px $border-color ; | border-left: solid 1px $border-color ; | ||||
font-family: $font-family ; | font-family: $font-family ; | ||||
font-size: 13px; | |||||
&.align-left { | &.align-left { | ||||
text-align: left ; | text-align: left ; |
'document_display_orders_invoice', | 'document_display_orders_invoice', | ||||
'document_display_orders_delivery_note', | 'document_display_orders_delivery_note', | ||||
'document_display_prices_delivery_note', | 'document_display_prices_delivery_note', | ||||
'document_display_product_description', | |||||
'option_email_confirm', | 'option_email_confirm', | ||||
'option_email_confirm_producer', | 'option_email_confirm_producer', | ||||
'option_csv_export_all_products', | 'option_csv_export_all_products', | ||||
'option_allow_order_guest' => 'Autoriser les visiteurs à passer commande (création de compte à la fin du tunnel)', | 'option_allow_order_guest' => 'Autoriser les visiteurs à passer commande (création de compte à la fin du tunnel)', | ||||
'option_order_entry_point' => 'Point d\'entrée par point de vente ou par date', | 'option_order_entry_point' => 'Point d\'entrée par point de vente ou par date', | ||||
'option_delivery' => 'Proposer la livraison à domicile', | 'option_delivery' => 'Proposer la livraison à domicile', | ||||
'option_display_export_grid' => 'Afficher l\'export grille dans les distributions' | |||||
'option_display_export_grid' => 'Afficher l\'export grille dans les distributions', | |||||
'document_display_product_description' => 'Documents : afficher la description des produits' | |||||
]; | ]; | ||||
} | } | ||||
<?php | |||||
use yii\db\Migration; | |||||
use yii\db\Schema ; | |||||
/** | |||||
* Class m220823_083001_add_option_document_display_product_description | |||||
*/ | |||||
class m220823_083001_add_option_document_display_product_description extends Migration | |||||
{ | |||||
public function safeUp() | |||||
{ | |||||
$this->addColumn('producer', 'document_display_product_description', Schema::TYPE_BOOLEAN.' DEFAULT 1'); | |||||
} | |||||
public function safeDown() | |||||
{ | |||||
$this->dropColumn('producer', 'document_display_product_description'); | |||||
} | |||||
} |