Browse Source

Merge branch 'dev'

master
Guillaume Bourgeois 5 years ago
parent
commit
0da696fb22
5 changed files with 7 additions and 16 deletions
  1. +2
    -0
      backend/controllers/DistributionController.php
  2. +1
    -1
      backend/views/distribution/index.php
  3. +2
    -14
      backend/views/producer/update.php
  4. +1
    -1
      backend/web/js/vuejs/producer-update.js
  5. +1
    -0
      producer/controllers/OrderController.php

+ 2
- 0
backend/controllers/DistributionController.php View File

@@ -97,6 +97,8 @@ class DistributionController extends BackendController
// commandes
$ordersArray = Order::searchAll([
'distribution.date' => $date,
],[
'orderby' => 'user.lastname ASC, user.name ASC'
]);
// montant et poids des commandes

+ 1
- 1
backend/views/distribution/index.php View File

@@ -236,7 +236,7 @@ $this->setPageTitle('Distributions') ;
<label class="label label-warning" v-else>admin</label>
</td>
<td>
<span v-if="order.user">{{ order.user.name +' '+order.user.lastname }}</span>
<span v-if="order.user">{{ order.user.lastname+' '+order.user.name }}</span>
<span v-else>{{ order.username }}</span>
</td>
<td v-if="idActivePointSale == 0">

+ 2
- 14
backend/views/producer/update.php View File

@@ -85,8 +85,7 @@ $this->addBreadcrumb($this->getTitle()) ;
<?= $form->field($model, 'photo')->fileInput() ?>
<?php
if (strlen($model->photo)) {
$base_url = Yii::$app->urlManagerProducer->getHostInfo().'/'.Yii::$app->urlManagerProducer->baseUrl ;
echo '<img src="'.$base_url.'uploads/' . $model->photo . '" width="400px" /><br />';
echo '<img src="'.Yii::$app->urlManagerProducer->getBaseUrl().'/uploads/' . $model->photo . '" width="400px" /><br />';
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />';
}
?>
@@ -161,7 +160,7 @@ $this->addBreadcrumb($this->getTitle()) ;
<div v-show="currentSection == 'credit-payment'" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Crédit / paiement en ligne</h3>
<h3 class="panel-title">Crédit</h3>
</div>
<div class="panel-body">
<?= $form->field($model, 'credit')
@@ -184,17 +183,6 @@ $this->addBreadcrumb($this->getTitle()) ;
Producer::CREDIT_FUNCTIONING_OPTIONAL => 'Optionnelle',
Producer::CREDIT_FUNCTIONING_MANDATORY => 'Obligatoire',
], []) ; ?>

<?= $form->field($model, 'online_payment')
->dropDownList([
0 => 'Non',
1 => 'Oui',
], [])
->label('Activer le paiement en ligne')
->hint('Le paiement en ligne permet à vos utilisateurs de recharger leur Crédit'
. ' via leur carte bancaire.') ; ?>
<?= $form->field($model, 'secret_key_payplug') ?>
</div>
</div>

+ 1
- 1
backend/web/js/vuejs/producer-update.js View File

@@ -18,7 +18,7 @@ var app = new Vue({
},
{
name: 'credit-payment',
nameDisplay: 'Crédit / paiement en ligne'
nameDisplay: 'Crédit'
},
{
name: 'infos',

+ 1
- 0
producer/controllers/OrderController.php View File

@@ -564,6 +564,7 @@ class OrderController extends ProducerBaseController
$product['photo'] = '' ;
}
$product['quantity_max'] = $product['productDistribution'][0]['quantity_max'] ;
$quantityOrder = Order::getProductQuantity($product['id'], $ordersArray) ;
$product['quantity_ordered'] = $quantityOrder ;
$product['quantity_remaining'] = $product['quantity_max'] - $quantityOrder ;

Loading…
Cancel
Save