Bladeren bron

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

refactoring
Guillaume Bourgeois 2 jaren geleden
bovenliggende
commit
58770ab7be
3 gewijzigde bestanden met toevoegingen van 5 en 2 verwijderingen
  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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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') ;

Laden…
Annuleren
Opslaan