@@ -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; |
@@ -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 |
@@ -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() { |