Guillaume Bourgeois 2 лет назад
Родитель
Сommit
005ea4cbdc
11 измененных файлов: 743 добавлений и 594 удалений
  1. +502
    -448
      backend/controllers/DistributionController.php
  2. +19
    -6
      backend/controllers/DocumentController.php
  3. +25
    -13
      backend/views/distribution/index.php
  4. +28
    -14
      backend/views/document/_form.php
  5. +16
    -10
      backend/web/css/screen.css
  6. +35
    -6
      backend/web/js/vuejs/distribution-index.js
  7. +102
    -90
      backend/web/sass/_responsive.scss
  8. +1
    -1
      common/config/params.php
  9. +7
    -0
      common/models/Order.php
  10. +4
    -4
      common/models/Product.php
  11. +4
    -2
      common/versions/22.11.A.php

+ 502
- 448
backend/controllers/DistributionController.php
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 19
- 6
backend/controllers/DocumentController.php Просмотреть файл

@@ -316,11 +316,10 @@ class DocumentController extends BackendController
return $document->downloadPdf();
}

public function actionSend($id)
public function actionSend($id, $backUpdateForm = false)
{
$document = $this->findModel($id);
if ($document->send()) {

$document->is_sent = true;
$document->save();

@@ -328,7 +327,13 @@ class DocumentController extends BackendController
} else {
Yii::$app->getSession()->setFlash('danger', $this->getFlashMessage('send', $document));
}
$this->redirect([$this->getControllerUrl() . '/index']);

if($backUpdateForm) {
return $this->redirect([$this->getControllerUrl() . '/update', 'id' => $id]);
}
else {
return $this->redirect([$this->getControllerUrl() . '/index']);
}
}

public function actionAjaxUserInfos($typeAction, $idUser, $classDocument, $idDocument = false)
@@ -397,7 +402,7 @@ class DocumentController extends BackendController
return ['return' => 'error'];
}

public function actionValidate($id)
public function actionValidate($id, $backUpdateForm = false)
{
$classDocument = $this->getClass();

@@ -414,7 +419,13 @@ class DocumentController extends BackendController
$document->generatePdf(Pdf::DEST_FILE);

Yii::$app->getSession()->setFlash('success', $this->getFlashMessage('validate', $document));
return $this->redirect([$this->getControllerUrl() . '/index']);

if($backUpdateForm) {
return $this->redirect([$this->getControllerUrl() . '/update', 'id' => $id]);
}
else {
return $this->redirect([$this->getControllerUrl() . '/index']);
}
}
}

@@ -472,7 +483,9 @@ class DocumentController extends BackendController
$order->init();
$productsOrderArray = [];
foreach ($order->productOrder as $productOrder) {
$productsOrderArray[$productOrder->id] = $productOrder->getAttributes();
$productsOrderArray[$productOrder->id] = array_merge($productOrder->getAttributes(), [
'url_order' => Yii::$app->urlManager->createUrl(['distribution/index', 'idOrderUpdate' => $productOrder->id_order])
]);
}
$ordersArray[$order->id] = array_merge(
$order->getAttributes(),

+ 25
- 13
backend/views/distribution/index.php Просмотреть файл

@@ -210,8 +210,8 @@ $this->setPageTitle('Distributions') ;
<a :href="distribution.url_report" class="btn btn-xs btn-default" v-if="countOrders > 0">Liste (PDF)</a>
<a :href="distribution.url_report+'&type=csv'" class="btn btn-xs btn-default" v-if="countOrders > 0">Tableau (CSV)</a>

<br v-if="producer.option_display_export_grid && countOrders > 0" />
<a :href="distribution.url_report_grid" class="btn btn-xs btn-default" v-if="producer.option_display_export_grid && countOrders > 0">Grille (PDF)</a>
<br v-if="producer && producer.option_display_export_grid && countOrders > 0" />
<a :href="distribution.url_report_grid" class="btn btn-xs btn-default" v-if="producer && producer.option_display_export_grid && countOrders > 0">Grille (PDF)</a>
</span>
</div>
</div>
@@ -278,11 +278,11 @@ $this->setPageTitle('Distributions') ;
</ul>
</div>
<button id="btn-add-subscriptions" @click="addSubscriptions" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span> Importer les abonnements</button>
<template v-if="producer.tiller == true">
<template v-if="producer && producer.tiller == true">
<button v-if="tillerIsSynchro" id="btn-tiller" class="btn btn-success btn-xs" disabled><span class="glyphicon glyphicon-refresh"></span> Synchronisé avec Tiller</button>
<button v-else id="btn-tiller" class="btn btn-xs btn-default" @click="synchroTiller"><span class="glyphicon glyphicon-refresh"></span> Synchroniser avec Tiller</button>
</template>
<button v-if="producer.credit" id="btn-pay-orders" class="btn btn-default btn-xs" @click="payOrders"><span class="glyphicon glyphicon-euro"></span> Payer les commandes</button>
<button v-if="producer && producer.credit" id="btn-pay-orders" class="btn btn-default btn-xs" @click="payOrders"><span class="glyphicon glyphicon-euro"></span> Payer les commandes</button>
<button id="btn-add-order" @click="openModalFormOrderCreate" class="btn btn-xs btn-primary"><span class="glyphicon glyphicon-plus"></span> Ajouter une commande</button>
</div>
<div class="left">
@@ -320,7 +320,7 @@ $this->setPageTitle('Distributions') ;
<th class="column-amount">Montant</th>
<th class="column-state-payment">Paiement</th>
<th class="column-payment"></th>
<th class="column-tiller" v-if="producer.tiller">Tiller</th>
<th class="column-tiller" v-if="producer && producer.tiller">Tiller</th>
<th class="column-actions"></th>
<th class="column-delivery-note"></th>
</tr>
@@ -368,10 +368,10 @@ $this->setPageTitle('Distributions') ;
<span class="label label-default input-group-addon" v-else-if="order.amount_paid > order.amount">surplus</span>
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à payer</span>

<span class="glyphicon glyphicon-time" title="Paiement automatique" v-if="order.auto_payment && producer.credit && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span>
<span class="glyphicon glyphicon-time" title="Paiement automatique" v-if="order.auto_payment && producer && producer.credit && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span>
</div>
</td>
<td class="column-payment" v-if="producer.credit">
<td class="column-payment" v-if="producer && producer.credit">
<div class="btn-group" v-if="order.user && !order.date_delete">
<button class="btn btn-xs btn-default" v-if="order.amount_paid == order.amount" @click="orderPaymentClick" :data-id-order="order.id" data-type="refund" :data-amount="order.amount">
<span class="glyphicon glyphicon-euro"></span> Rembourser
@@ -395,7 +395,7 @@ $this->setPageTitle('Distributions') ;
</ul>
</div>
</td>
<td v-if="producer.tiller" class="tiller column-tiller">
<td v-if="producer && producer.tiller" class="tiller column-tiller">
<input v-if="order.tiller_synchronization == true" type="checkbox" checked="checked" :id="'checkbox-tiller-synchronization-'+order.id" :data-id-order="order.id" @change="changeSynchroTiller" />
<input v-else type="checkbox" :id="'checkbox-tiller-synchronization-'+order.id" :data-id-order="order.id" @change="changeSynchroTiller" />
<label :for="'checkbox-tiller-synchronization-'+order.id">Tiller</label>
@@ -429,6 +429,7 @@ $this->setPageTitle('Distributions') ;
@close="showModalFormOrderUpdate = false"
@ordercreatedupdated="orderCreatedUpdated"
@updateproductorderprices="updateProductOrderPrices"
@updateinvoiceprices="updateInvoicePrices"
></order-form>

<modal v-if="showModalPayment && idOrderPayment == order.id" class="modal-payment" @close="showModalPayment = false">
@@ -586,7 +587,7 @@ $this->setPageTitle('Distributions') ;
</div>
<div class="col-md-4">
<div class="form-group">
<a v-if="producer.credit && order.id_user > 0 && user.id_user == order.id_user" class="btn btn-xs btn-primary btn-credit" :href="baseUrl+'/user/credit?id='+user.id_user" v-for="user in users">{{ parseFloat(user.credit).toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+'&nbsp;€' }}</a>
<a v-if="producer && producer.credit && order.id_user > 0 && user.id_user == order.id_user" class="btn btn-xs btn-primary btn-credit" :href="baseUrl+'/user/credit?id='+user.id_user" v-for="user in users">{{ parseFloat(user.credit).toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+'&nbsp;€' }}</a>
<label class="control-label" for="select-id-user">
Utilisateur
</label>
@@ -650,6 +651,14 @@ $this->setPageTitle('Distributions') ;
<input type="text" v-model="order.productOrder[product.id].price_with_tax" class="form-control input-sm" @change="productPriceChange" :data-with-tax="true" :data-id-product="product.id" />
<span class="input-group-addon" id="basic-addon2">€ TTC</span>
</div>
<div v-if="(order.id_invoice || order.id_delivery_note || order.id_quotation) && order.productOrder[product.id].quantity > 0">
<span class="label label-default">
Facturé
<template v-if="order.productOrder[product.id].invoice_price != null">{{ order.productOrder[product.id].invoice_price }}</template>
<template v-else>{{ order.productOrder[product.id].price }}</template>
€ HT
</span>
</div>
</td>
<td class="quantity">
<div class="input-group">
@@ -677,13 +686,16 @@ $this->setPageTitle('Distributions') ;
<button class="modal-default-button btn btn-primary" @click="submitFormUpdate" v-if="order.id && order.id_user > 0" data-process-credit="1">Modifier et payer</button>

<button class="modal-default-button btn btn-primary" @click="submitFormUpdate" v-if="order.id">Modifier</button>
<button class="modal-default-button btn btn-primary" @click="submitFormCreate" v-else>Créer</button>
<button class="modal-default-button btn btn-primary" @click="submitFormCreate" v-if="!order.id">Créer</button>

<button class="modal-default-button btn btn-danger" @click="$emit('close')">Annuler</button>
<button class="modal-default-button btn btn-danger" @click="$emit('close')">Fermer</button>

<div class="right">
<button class="modal-default-button btn btn-info" @click="updateProductOrderPrices(true)">Recharger les prix</button>
<button class="modal-default-button btn btn-info" @click="toggleVatMode()">
<button class="modal-default-button btn btn-info btn-update-prices" @click="updateProductOrderPrices(true)">Recharger les prix</button>
<button v-if="order.id" class="modal-default-button btn btn-info btn-update-prices" @click="updateInvoicePrices(true)">
Réinitialiser les prix facturés
</button>
<button class="modal-default-button btn btn-info btn-display-prices-without-tax" @click="toggleVatMode()">
<template v-if="vatMode == 'all'">Cacher</template>
<template v-else>Afficher</template>
les prix HT

+ 28
- 14
backend/views/document/_form.php Просмотреть файл

@@ -139,7 +139,11 @@ use common\models\Producer;
<div id="" class="info-box">
<span class="info-box-icon bg-green"><i class="fa fa-sticky-note-o"></i></span>
<div class="info-box-content">
<span class="info-box-text"><?= $typeDocument ?> <span v-html="document.html_label"></span></span>
<span class="info-box-text">
<?= $typeDocument ?>
<span v-html="document.html_label"></span>
<span v-if="document.is_sent" class="label label-success">Envoyé</span>
</span>
<span class="info-box-number">{{ document.reference }}</span>
<span class="info-box-text">Date</span>
<span class="info-box-number">{{ document.date }}</span>
@@ -152,29 +156,39 @@ use common\models\Producer;
<span class="info-box-number">{{ formatPrice(total_with_tax) }}</span>
</div>
</div>
<div id="" class="info-box">
<span class="info-box-icon bg-yellow"><i class="fa fa-calendar"></i></span>
<div class="info-box-content">
<span class="info-box-text">Commandes</span>
<?php foreach($model->orders as $order): ?>
<a class="btn btn-sm btn-default" href="<?= Yii::$app->urlManager->createUrl(['distribution/index', 'idOrderUpdate' => $order->id]); ?>">
<?= date('d/m/Y', strtotime($order->distribution->date)) ?>
</a>
<?php endforeach; ?>
</div>
</div>
<div id="" class="info-box">
<span class="info-box-icon bg-blue"><i class="fa fa-download"></i></span>
<div class="info-box-content">
<a href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/download', 'id' => $model->id]) ?>"
class="btn btn-default"><span class="glyphicon glyphicon-download-alt"></span> Télécharger (PDF)</a>
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-download-alt"></span> Télécharger (PDF)</a>
<?php if ($model->getClass() == 'Invoice' && Producer::getConfig('option_export_evoliz')): ?>
<a href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/export-csv-evoliz', 'id' => $model->id]) ?>"
class="btn btn-default"><span class="glyphicon glyphicon-save-file"></span> Export Evoliz
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-save-file"></span> Export Evoliz
(CSV)</a>
<?php endif; ?>
</div>
</div>
<div v-if="document.status == 'draft'" id="" class="info-box">
<div v-if="document.status == 'draft' || !document.is_sent" class="info-box">
<span class="info-box-icon bg-red"><i class="fa fa-flash"></i></span>
<div class="info-box-content">
<form action="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/validate']) ?>">
<?= Html::hiddenInput('id', $model->id); ?>
<button class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Valider le document
</button>
</form>

<a v-if="document.status == 'draft'" href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/validate', 'id' => $model->id, 'backUpdateForm' => 1]) ?>"
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-ok"></span> Valider le document</a>

<?php if (isset($model->user) && strlen($model->user->email) > 0): ?>
<a href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/send', 'id' => $model->id]) ?>"
class="btn btn-default"><span class="glyphicon glyphicon-send"></span> Envoyer le
<a v-if="!document.is_sent" href="<?= Yii::$app->urlManager->createUrl([Yii::$app->controller->getControllerUrl() . '/send', 'id' => $model->id, 'backUpdateForm' => 1]) ?>"
class="btn btn-sm btn-default"><span class="glyphicon glyphicon-send"></span> Envoyer le
document</a>
<?php endif; ?>
</div>
@@ -267,9 +281,9 @@ use common\models\Producer;
<div class="product-name">{{ getProductById(productOrder.id_product).name }}
</div>
<ul class="product-order-meta">
<li>{{ order.username }}</li>
<li v-if="order.distribution_date">{{ order.distribution_date }}</li>
<li v-if="order.point_sale_name">{{ order.point_sale_name }}</li>
<li v-if="order.distribution_date">Commande : <a class="btn btn-sm btn-default" :href="productOrder.url_order">{{ order.distribution_date }}</a></li>
<li>Utilisateur : {{ order.username }}</li>
<li v-if="order.point_sale_name">Point de vente : {{ order.point_sale_name }}</li>
</ul>
</td>
<td class="col-md-2">

+ 16
- 10
backend/web/css/screen.css Просмотреть файл

@@ -2532,45 +2532,51 @@ termes.
width: 50px;
height: 52px;
}
/* line 67, ../sass/_responsive.scss */
/* line 68, ../sass/_responsive.scss */
.distribution-index .modal-form-order .modal-container .modal-body table.table-products td.price {
display: none;
}
/* line 79, ../sass/_responsive.scss */
/* line 76, ../sass/_responsive.scss */
.distribution-index .modal-form-order .modal-container .modal-footer .actions-form div.right {
display: none;
}
/* line 87, ../sass/_responsive.scss */
.distribution-index #orders #buttons-top-orders .left {
width: 100%;
float: none;
}
/* line 83, ../sass/_responsive.scss */
/* line 92, ../sass/_responsive.scss */
.distribution-index #orders #buttons-top-orders .right {
width: 100%;
float: none;
}
/* line 88, ../sass/_responsive.scss */
/* line 97, ../sass/_responsive.scss */
.distribution-index #orders #buttons-top-orders .btn {
padding: 8px 15px;
margin: 10px;
display: block;
width: 100%;
}
/* line 98, ../sass/_responsive.scss */
/* line 107, ../sass/_responsive.scss */
.distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale li {
float: none;
width: 100%;
}
/* line 101, ../sass/_responsive.scss */
/* line 111, ../sass/_responsive.scss */
.distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale li a {
display: block;
}
/* line 110, ../sass/_responsive.scss */
/* line 120, ../sass/_responsive.scss */
.distribution-index #orders table ul.dropdown-menu a {
padding: 15px;
}
/* line 114, ../sass/_responsive.scss */
.distribution-index #orders table button {
/* line 125, ../sass/_responsive.scss */
.distribution-index #orders table button.dropdown-toggle,
.distribution-index #orders table button.btn-moins,
.distribution-index #orders table button.btn-plus {
padding: 15px;
}
/* line 119, ../sass/_responsive.scss */
/* line 132, ../sass/_responsive.scss */
.distribution-index #orders table .column-origin,
.distribution-index #orders table .column-point-sale,
.distribution-index #orders table .column-state-payment,

+ 35
- 6
backend/web/js/vuejs/distribution-index.js Просмотреть файл

@@ -202,16 +202,19 @@ var app = new Vue({
app.calendar.attrs = [] ;
var distributions = response.data.distributions ;

console.log(app.calendar.attrs);

if(distributions.length) {
for(var i= 0; i < distributions.length; i++) {
app.calendar.attrs.push({
app.calendar.attrs.push({
highlight: {
backgroundColor: '#5cb85c',
},
contentStyle: {
color: 'white',
},
dates: distributions[i].date,
dates: distributions[i].date
}) ;
}
}
@@ -634,7 +637,7 @@ var app = new Vue({
Vue.set(app.ordersUpdate[keyOrderUpdate].productOrder[idProduct], 'prices', response.data[idProduct].prices);
Vue.set(app.ordersUpdate[keyOrderUpdate].productOrder[idProduct], 'active', response.data[idProduct].active);
Vue.set(app.ordersUpdate[keyOrderUpdate].productOrder[idProduct], 'unit_coefficient', response.data[idProduct].unit_coefficient);
Vue.set(app.ordersUpdate[keyOrderUpdate].productOrder[idProduct], 'prices', response.data[idProduct].prices);
Vue.set(app.ordersUpdate[keyOrderUpdate].productOrder[idProduct], 'invoice_price', response.data[idProduct].invoice_price);

if(updatePricesOnUpdateOrder) {
Vue.set(
@@ -660,6 +663,29 @@ var app = new Vue({
});
}
},
updateInvoicePrices: function() {
var order = null;

if(app.showModalFormOrderUpdate && app.idOrderUpdate) {
for (keyOrderUpdate in app.ordersUpdate) {
if (app.ordersUpdate[keyOrderUpdate].id == app.idOrderUpdate) {
order = app.ordersUpdate[keyOrderUpdate] ;
}
}
}

if(order) {
axios.get(UrlManager.getBaseUrlAbsolute() + "distribution/ajax-update-invoice-prices", {
params: {
idOrder: order.id
}
})
.then(function (response) {
app.updateProductOrderPrices(false);
appAlerts.alert('info','Prix facturés réinitialisés.') ;
});
}
},
getBestProductPrice: function(order, idProduct, theQuantity, withTax) {
var thePrice = 9999;
var pricesArray = order.productOrder[idProduct].prices;
@@ -717,7 +743,7 @@ Vue.component('modal', {

Vue.component('order-form',{
props: ['date', 'dateFormat', 'pointsSale', 'idActivePointSale', 'meansPayment', 'users', 'products', 'order', 'producer', 'loadingUpdateProductOrder'],
emits: ['updateProductPrice'],
emits: ['updateProductPrice', 'updateInvoicePrices'],
data: function() {
return {
errors: [],
@@ -726,7 +752,7 @@ Vue.component('order-form',{
username : '',
comment: '',
baseUrl: $('meta[name=baseurl]').attr('content'),
vatMode: 'with_tax'
vatMode: 'all' // 'with_tax'
} ;
},
template: '#order-form-template',
@@ -904,7 +930,10 @@ Vue.component('order-form',{
this.updateProductOrderPrices(true) ;
},
updateProductOrderPrices: function(updateProductOrderPrices) {
this.$emit('updateproductorderprices', updateProductOrderPrices) ;
this.$emit('updateproductorderprices', updateProductOrderPrices);
},
updateInvoicePrices: function() {
this.$emit('updateinvoiceprices');
},
toggleVatMode: function() {
if(this.vatMode == 'all') {

+ 102
- 90
backend/web/sass/_responsive.scss Просмотреть файл

@@ -37,99 +37,111 @@ termes.

@media screen and (max-width: 768px) {

.main-header {
.navbar {
border-top: solid 1px #e0e0e0 ;
border-bottom: solid 1px #e0e0e0 ;
}
.main-header {
.navbar {
border-top: solid 1px #e0e0e0;
border-bottom: solid 1px #e0e0e0;
}
}

.navbar-custom-menu {
.producer-menu {
span {
display: none;
}
}
}

.distribution-index {

.modal-form-order {
.modal-container {
.modal-body {
table.table-products {
td.quantity {
.form-control {
width: 50px;
height: 52px;
}
}

td.price {
display: none;
}
}
}

.navbar-custom-menu {
.producer-menu {
span {
display: none ;
}
}
.modal-footer {
.actions-form {
div.right {
display: none;
}
}
}
}
}

.distribution-index {

.modal-form-order {
.modal-container {
.modal-body {
table.table-products {
td.quantity {
.form-control {
width: 50px;
height: 52px;
}
}
td.price {
display: none ;
}
}

}
}
}

#orders {

#buttons-top-orders {
.left {
width: 100%;
float: none;
}
.right {
width: 100% ;
float: none ;
}

.btn {
padding: 8px 15px ;
margin: 10px ;
display: block ;
width: 100% ;
}
}

#wrapper-nav-points-sale {
ul#nav-points-sale {
li {
float: none ;
width: 100% ;
a {
display: block ;
}
}
}
}

table {
ul.dropdown-menu {
a {
padding: 15px ;
}
}
button {
padding: 15px ;
}

//.column-checkbox,
.column-origin,
//.column-state,
//.column-user,
.column-point-sale,
//.column-amount,
.column-state-payment,
.column-payment,
.column-tiller,
//.column-actions,
.column-delivery-note {
display: none ;
}

}
}
#orders {

#buttons-top-orders {
.left {
width: 100%;
float: none;
}

.right {
width: 100%;
float: none;
}

.btn {
padding: 8px 15px;
margin: 10px;
display: block;
width: 100%;
}
}

#wrapper-nav-points-sale {
ul#nav-points-sale {
li {
float: none;
width: 100%;

a {
display: block;
}
}
}
}

table {
ul.dropdown-menu {
a {
padding: 15px;
}
}

button.dropdown-toggle,
button.btn-moins,
button.btn-plus {
padding: 15px;
}

//.column-checkbox,
.column-origin,
//.column-state,
//.column-user,
.column-point-sale,
//.column-amount,
.column-state-payment,
.column-payment,
.column-tiller,
//.column-actions,
.column-delivery-note {
display: none;
}
}
}
}
}

+ 1
- 1
common/config/params.php Просмотреть файл

@@ -37,7 +37,7 @@
*/

return [
'version' => '22.10.A',
'version' => '22.11.A',
'adminEmail' => 'contact@opendistrib.net',
'supportEmail' => 'contact@opendistrib.net',
'user.passwordResetTokenExpire' => 3600,

+ 7
- 0
common/models/Order.php Просмотреть файл

@@ -1094,4 +1094,11 @@ class Order extends ActiveRecordCommon

return $comment;
}

public function isLinkedToValidDocument()
{
return ($this->deliveryNote && $this->deliveryNote->isStatusValid())
|| ($this->quotation && $this->quotation->isStatusValid())
|| ($this->invoice && $this->invoice->isStatusValid());
}
}

+ 4
- 4
common/models/Product.php Просмотреть файл

@@ -409,18 +409,18 @@ class Product extends ActiveRecordCommon
foreach ($specificPriceArray as $specificPrice) {
$priceArray[] = [
'from_quantity' => $specificPrice->from_quantity ? $specificPrice->from_quantity : 0,
'price' => $this->getPrice([
'price' => number_format($this->getPrice([
'user' => $user,
'user_producer' => $userProducer,
'point_sale' => $pointSale,
'quantity' => $specificPrice->from_quantity
]),
'price_with_tax' => $this->getPriceWithTax([
]), 3),
'price_with_tax' => number_format($this->getPriceWithTax([
'user' => $user,
'user_producer' => $userProducer,
'point_sale' => $pointSale,
'quantity' => $specificPrice->from_quantity
]),
]), 2),
];
}


+ 4
- 2
common/versions/22.11.A.php Просмотреть файл

@@ -1,15 +1,17 @@

<h4>Date de sortie</h4>
<ul>
<li></li>
<li>08/11/2022</li>
</ul>

<h4>Évolutions</h4>
<ul>
<li></li>
<li>[Administration] Documents > édition : liens vers les commandes associées</li>
<li>[Administration] Distributions > édition commande : bouton de réinitialisation des prix facturés</li>
</ul>

<h4>Maintenance</h4>
<ul>
<li>[Administration] Abonnements : suppression des commandes après la date de fin lors de l'arrêt d'un abonnement</li>
<li>[Administration] Distributions > calendrier : amélioration chargement automatique des distributions (affichage pastilles vertes)</li>
</ul>

Загрузка…
Отмена
Сохранить