Explorar el Código

Produits : correctif édition quantité (arrondis) #240

refactoring
Guillaume hace 2 años
padre
commit
26f152cfa0
Se han modificado 3 ficheros con 5 adiciones y 3 borrados
  1. +1
    -1
      backend/controllers/DistributionController.php
  2. +2
    -1
      backend/web/js/vuejs/distribution-index.js
  3. +2
    -1
      producer/web/js/vuejs/order-order.js

+ 1
- 1
backend/controllers/DistributionController.php Ver fichero

@@ -1482,7 +1482,7 @@ class DistributionController extends BackendController
] ;
}

if ($firstOrder && $firstOrder->id_user) {
if ($firstOrder) {
// génération du BL
if(!$deliveryNote) {
$deliveryNote = new DeliveryNote;

+ 2
- 1
backend/web/js/vuejs/distribution-index.js Ver fichero

@@ -728,8 +728,9 @@ Vue.component('order-form',{
}
if(parseFloat(this.order.productOrder[id_product].quantity) + quantity >= 0) {
var theQuantity = parseFloat(this.order.productOrder[id_product].quantity) + parseFloat(quantity) ;

Vue.set(this.order.productOrder, id_product, {
quantity: theQuantity,
quantity: theQuantity.toFixed(2),
unit: this.order.productOrder[id_product].unit,
price: this.order.productOrder[id_product].price,
active: this.order.productOrder[id_product].active

+ 2
- 1
producer/web/js/vuejs/order-order.js Ver fichero

@@ -429,7 +429,8 @@ var app = new Vue({
(this.products[product.index].quantity_form + quantity <= (this.products[product.index].quantity_remaining * this.products[product.index].coefficient_unit) ||
!this.products[product.index].quantity_max)
) {
this.products[product.index].quantity_form += quantity ;
var theQuantity = parseFloat(this.products[product.index].quantity_form) + parseFloat(quantity);
this.products[product.index].quantity_form = parseFloat(theQuantity.toFixed(2)) ;
}
},
oneProductOrdered: function() {

Cargando…
Cancelar
Guardar