Ver código fonte

[Backend] Bons de livraison : correctif recherche par point de vente

feature/souke
Guillaume Bourgeois 1 ano atrás
pai
commit
972bd5ab2b
3 arquivos alterados com 5 adições e 29 exclusões
  1. +1
    -0
      common/config/.gitignore
  2. +0
    -29
      common/config/test-local.php
  3. +4
    -0
      common/models/DeliveryNoteSearch.php

+ 1
- 0
common/config/.gitignore Ver arquivo

@@ -1,6 +1,7 @@
bootstrap.php
main-local.php
params-local.php
test-local.php

stripe/*.key
mailjet/*.key

+ 0
- 29
common/config/test-local.php Ver arquivo

@@ -1,29 +0,0 @@
<?php

return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=opendistrib_test',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => true,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp-laclic.alwaysdata.net',
'username' => 'nepasrepondre@laclic.fr',
'password' => 'UPdz4ain73u3T3S74z2MHG9gUKnu6Qq6',
'port' => '25',
//'encryption' => 'tls',
],
],
],
];

+ 4
- 0
common/models/DeliveryNoteSearch.php Ver arquivo

@@ -60,6 +60,10 @@ class DeliveryNoteSearch extends DeliveryNote
{
$optionsSearch = self::defaultOptionsSearch();

if(isset($params['DeliveryNoteSearch']['id_point_sale'])) {
$optionsSearch['join_with'][] = 'orders';
}

$query = DeliveryNote::find()
->with($optionsSearch['with'])
->joinWith($optionsSearch['join_with'])

Carregando…
Cancelar
Salvar