소스 검색

Ajustements abonnements + alerte si commande sur un jour de distribution qui n'est pas activé

refactoring
Guillaume 3 년 전
부모
커밋
a4d27b1456
3개의 변경된 파일17개의 추가작업 그리고 12개의 파일을 삭제
  1. +4
    -0
      backend/views/distribution/index.php
  2. +1
    -1
      common/models/Subscription.php
  3. +12
    -11
      producer/views/order/order.php

+ 4
- 0
backend/views/distribution/index.php 파일 보기

@@ -282,6 +282,10 @@ $this->setPageTitle('Distributions') ;
</ul>
</div>

<div class="alert alert-danger" v-if="distribution && !distribution.active && orders && orders.length > 0">
Attention, ce jour de distribution n'est pas activé et vous avez quand même des commandes enregistrées.
</div>

<table class="table table-condensed table-bordered table-hover" v-if="countOrdersByPointSale[idActivePointSale] > 0 || (idActivePointSale == 0 && orders.length > 0)">
<thead>
<tr>

+ 1
- 1
common/models/Subscription.php 파일 보기

@@ -178,7 +178,7 @@ class Subscription extends ActiveRecordCommon
'distribution.date' => date('Y-m-d', strtotime($date))
]);

if ($distribution && count($this->productSubscription) && $this->id_point_sale) {
if ($distribution && $distribution->active && count($this->productSubscription) && $this->id_point_sale) {
// commande
$order = new Order;
if (strlen($this->username)) {

+ 12
- 11
producer/views/order/order.php 파일 보기

@@ -142,17 +142,18 @@ $producer = GlobalParam::getCurrentProducer() ;
</div>
<div id="calendar">
<v-calendar
is-inline
is-double-paned
is-expanded
v-model="date"
mode="single"
firstDayOfWeek="1"
:formats="calendar.formats"
:theme-styles="calendar.themeStyles"
:attributes="calendar.attrs"
:available-dates="calendar.availableDates"
@dayclick='dayClick'>
is-inline
is-double-paned
is-expanded
v-model="date"
mode="single"
locale="fr"
:locale="{id: 'fr', firstDayOfWeek: 2, masks: { weekdays: 'WW' }}"
:formats="calendar.formats"
:theme-styles="calendar.themeStyles"
:attributes="calendar.attrs"
:available-dates="calendar.availableDates"
@dayclick='dayClick'
></v-calendar>
</div>
<?php if($producer->behavior_order_select_distribution == Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST ): ?>

Loading…
취소
저장