|
|
@@ -365,12 +365,12 @@ var app = new Vue({ |
|
|
|
this.idOrderUpdate = idOrder ; |
|
|
|
this.showModalFormOrderUpdate = true ; |
|
|
|
this.initModalFormOrder() ; |
|
|
|
this.updateProductOrderPrices(); |
|
|
|
this.updateProductOrderPrices(false); |
|
|
|
}, |
|
|
|
openModalFormOrderCreate: function() { |
|
|
|
this.showModalFormOrderCreate = true ; |
|
|
|
this.initModalFormOrder() ; |
|
|
|
this.updateProductOrderPrices() ; |
|
|
|
this.updateProductOrderPrices(false) ; |
|
|
|
}, |
|
|
|
initModalFormOrder: function() { |
|
|
|
setTimeout(function() { |
|
|
@@ -569,7 +569,7 @@ var app = new Vue({ |
|
|
|
}) ; |
|
|
|
}, |
|
|
|
|
|
|
|
updateProductOrderPrices: function() { |
|
|
|
updateProductOrderPrices: function(updatePricesOnUpdateOrder) { |
|
|
|
var app = this ; |
|
|
|
app.loadingUpdateProductOrder = true; |
|
|
|
var order = null ; |
|
|
@@ -611,6 +611,10 @@ 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); |
|
|
|
|
|
|
|
if(updatePricesOnUpdateOrder) { |
|
|
|
Vue.set(app.orderCreate.productOrder[idProduct], 'price', app.getBestProductPrice(app.orderCreate, idProduct, app.orderCreate.productOrder[idProduct].quantity)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@@ -786,11 +790,11 @@ Vue.component('order-form',{ |
|
|
|
}}) |
|
|
|
.then(function(response) { |
|
|
|
app.order.id_point_sale = response.data.id_favorite_point_sale ; |
|
|
|
app.updateProductOrderPrices() ; |
|
|
|
app.updateProductOrderPrices(true) ; |
|
|
|
}) ; |
|
|
|
}, |
|
|
|
pointSaleChange: function(event) { |
|
|
|
this.updateProductOrderPrices() ; |
|
|
|
this.updateProductOrderPrices(true) ; |
|
|
|
}, |
|
|
|
updateProductOrderPrices: function() { |
|
|
|
this.$emit('updateproductorderprices') ; |