Pārlūkot izejas kodu

[Backend] Commandes : problème modification prix #553

refactoring
Guillaume Bourgeois pirms 2 gadiem
vecāks
revīzija
58770ab7be
3 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. +1
    -0
      backend/controllers/OrderController.php
  2. +2
    -2
      backend/views/distribution/index.php
  3. +2
    -0
      backend/web/js/vuejs/distribution-index.js

+ 1
- 0
backend/controllers/OrderController.php Parādīt failu

@@ -938,6 +938,7 @@ class OrderController extends BackendController
if ($quantity) {
if ($productOrder) {
$productOrder->quantity = $quantity;
$productOrder->price = $dataProductOrder->price;
} else {
$product = Product::findOne($key);


+ 2
- 2
backend/views/distribution/index.php Parādīt failu

@@ -652,8 +652,8 @@ $this->setPageTitle('Distributions') ;
</div>
</td>
<td class="quantity-remaining infinite" v-if="product.quantity_remaining === null || order.productOrder[product.id].unit != product.unit">&infin;</td>
<td class="quantity-remaining negative" v-else-if="product.quantity_remaining <= 0">{{ product.quantity_remaining }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}</td>
<td class="quantity-remaining has-quantity" v-else>{{ product.quantity_remaining }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}</td>
<td class="quantity-remaining negative" v-else-if="product.quantity_remaining <= 0">{{ product.quantity_remaining }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}</td>
<td class="quantity-remaining has-quantity" v-else>{{ product.quantity_remaining }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}</td>
</tr>
</tbody>
</table>

+ 2
- 0
backend/web/js/vuejs/distribution-index.js Parādīt failu

@@ -765,6 +765,8 @@ Vue.component('order-form',{
data.append('comment', this.order.comment && this.order.comment.length ? this.order.comment : '') ;
data.append('processCredit', processCredit) ;

console.log(this.order.productOrder);

axios.post(UrlManager.getBaseUrlAbsolute()+"order/ajax-update",data)
.then(function(response) {
app.$emit('ordercreatedupdated') ;

Notiek ielāde…
Atcelt
Saglabāt