Compare commits

..

No commits in common. "02a010b50d58680542d8552111f60bf2eb3daf1b" and "589b7c0bfb9478e535e053e4a997fd2589312270" have entirely different histories.

View File

@ -82,14 +82,6 @@
required
></v-text-field>
</v-col>
<v-col>
<v-text-field
v-model="line.measuring_unit"
label="UdM"
persistent-placeholder="true"
readonly
></v-text-field>
</v-col>
<v-col>
<v-text-field
type="number"
@ -141,7 +133,7 @@
date: this.getCurrentDate(),
customer: null,
notes: '',
saleline_set: [{product:'', unit_price: 0, quantity: 0, unit: ''}],
saleline_set: [{product:'', unit_price: 0, quantity: 0}],
},
rules: {
required: value => !!value || 'Requerido.',
@ -204,8 +196,6 @@
const selectedProductId = this.purchase.saleline_set[index].product;
const selectedProduct = this.products.find(p => p.id == selectedProductId);
this.purchase.saleline_set[index].unit_price = selectedProduct.price;
console.log(selectedProduct.measuring_unit);
this.purchase.saleline_set[index].measuring_unit = selectedProduct.measuring_unit;
},
fetchClients() {
fetch('/don_confiao/api/customers/')
@ -233,7 +223,7 @@
});
},
addLine() {
this.purchase.saleline_set.push({ product: '', unit_price: 0, quantity:0, measuring_unit: ''});
this.purchase.saleline_set.push({ product: '', unit_price: 0, quantity:0 });
},
removeLine(index) {
// Solo elimina si hay más de una línea